前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >spring boot 配置属性大全(1)

spring boot 配置属性大全(1)

作者头像
gemron的空间
修改2020-02-24 14:30:18
3.3K0
修改2020-02-24 14:30:18
举报
文章被收录于专栏:gemrongemron

1.核心属性

默认值

描述

debug

false

启用调试日志。

info.*

要添加到信息端点的任意属性。

logging.config

日志记录配置文件的位置。例如,用于logback的`classpath:logback.xml`。

logging.exception-conversion-word

%wEx

记录异常时使用的转换字。

logging.file.clean-history-on-start

false

是否在启动时清除存档日志文件。仅默认登录设置支持。

logging.file.max-history

7

存档日志文件的最大保留天数。仅默认登录设置支持。

logging.file.max-size

10MB

最大日志文件大小。仅默认登录设置支持。

logging.file.name

日志文件名(例如,“ myapp.log”)。名称可以是确切位置,也可以是相对于当前目录的位置。

logging.file.path

日志文件的位置。例如,`/ var / log`。

logging.file.total-size-cap

0B

要保留的日志备份的总大小。仅默认登录设置支持。

logging.group.*

日志组可快速快速地同时更改多个记录器。例如,`logging.group.db = org.hibernate,org.springframework.jdbc`。

logging.level.*

日志级别严重性映射。例如,`logging.level.org.springframework = DEBUG`。

logging.pattern.console

%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}

Appender模式,用于输出到控制台。仅默认的Logback设置受支持。

logging.pattern.dateformat

yyyy-MM-dd HH:mm:ss.SSS

记录日期格式的附加模式。仅默认的Logback设置受支持。

logging.pattern.file

%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}

用于输出到文件的附加模式。仅默认的Logback设置受支持。

logging.pattern.level

%5p

日志级别的附加模式。仅默认的Logback设置受支持。

logging.pattern.rolling-file-name

${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz

过渡日志文件名的模式。仅默认的Logback设置受支持。

logging.register-shutdown-hook

false

初始化日志系统时,注册一个关闭挂钩。

spring.aop.auto

true

添加@EnableAspectJAutoProxy。

spring.aop.proxy-target-class

true

与基于标准Java接口的代理(false)相反,是否要创建基于子类的代理(CGLIB)(true)。

spring.application.admin.enabled

false

是否为应用程序启用管理功能。

spring.application.admin.jmx-name

org.springframework.boot:type=Admin,name=SpringApplication

应用程序管理员MBean的JMX名称。

spring.application.name

应用名称。

spring.autoconfigure.exclude

要排除的自动配置类。

spring.banner.charset

UTF-8

标语文件编码。

spring.banner.image.bitdepth

4

用于ANSI颜色的位深度。支持的值为4(16色)或8(256色)。

spring.banner.image.height

标语图像的高度(以字符为单位)(默认基于图像高度)。

spring.banner.image.invert

false

是否应针对黑暗的终端主题反转图像。

spring.banner.image.location

classpath:banner.gif

标语图片文件的位置(也可以使用jpg或png)。

spring.banner.image.margin

2

左手图像边距(以字符为单位)。

spring.banner.image.pixelmode

TEXT

渲染图像时使用的像素模式。

spring.banner.image.width

76

横幅图像的宽度(以字符为单位)。

spring.banner.location

classpath:banner.txt

标语文字资源位置。

spring.beaninfo.ignore

true

是否跳过对BeanInfo类的搜索。

spring.config.additional-location

除了默认值以外,还使用了配置文件位置。

spring.config.location

替换默认设置的配置文件位置。

spring.config.name

application

配置文件名。

spring.info.build.encoding

UTF-8

文件编码。

spring.info.build.location

classpath:META-INF/build-info.properties

生成的build-info.properties文件的位置。

spring.info.git.encoding

UTF-8

文件编码。

spring.info.git.location

classpath:git.properties

spring.jmx.default-domain

JMX域名。

spring.jmx.enabled

false

将管理bean公开到JMX域。

spring.jmx.server

mbeanServer

MBeanServer Bean名称。

spring.jmx.unique-names

false

是否应确保唯一的运行时对象名称。

spring.main.allow-bean-definition-overriding

false

是否允许通过使用与现有定义同名的定义来覆盖Bean定义。

spring.main.banner-mode

console

应用程序运行时用于显示横幅的模式。

spring.main.lazy-initialization

false

是否应延迟执行初始化。

spring.main.register-shutdown-hook

true

应用程序是否应该注册一个关闭挂钩。

spring.main.sources

包含在ApplicationContext中的源(类名,包名或XML资源位置)。

spring.main.web-application-type

标记以显式请求特定类型的Web应用程序。如果未设置,则基于类路径自动检测。

spring.mandatory-file-encoding

应用程序必须使用的预期字符编码。

spring.messages.always-use-message-format

false

是否始终应用MessageFormat规则,甚至分析不带参数的消息。

spring.messages.basename

messages

基名的逗号分隔列表(本质上是完全合格的类路径位置),每个都遵循ResourceBundle约定,并轻松支持基于斜杠的位置。如果它不包含包限定符(例如“ org.mypackage”),它将从类路径根目录中解析。

spring.messages.cache-duration

加载的资源束文件缓存持续时间。如果未设置,则捆绑包将永久缓存。如果未指定持续时间后缀,则将使用秒。

spring.messages.encoding

UTF-8

消息束编码。

spring.messages.fallback-to-system-locale

true

如果未找到特定语言环境的文件,是否退回到系统语言环境。如果关闭此选项,则唯一的后备选项将是默认文件(例如,基本名称“ messages”的“ messages.properties”)。

spring.messages.use-code-as-default-message

false

是否使用消息代码作为默认消息,而不是引发“ NoSuchMessageException”。仅在开发期间推荐。

spring.output.ansi.enabled

detect

配置ANSI输出。

spring.pid.fail-on-write-error

如果使用ApplicationPidFileWriter失败,但无法写入PID文件。

spring.pid.file

要写入的PID文件的位置(如果使用了ApplicationPidFileWriter)。

spring.profiles

用逗号分隔的概要文件表达式列表,至少要匹配一个概要文件表达式才能包含该文档。

spring.profiles.active

以逗号分隔的活动配置文件列表。可以被命令行开关覆盖。

spring.profiles.include

无条件激活指定的逗号分隔的配置文件列表(如果使用YAML,则激活配置文件列表)。

spring.quartz.auto-startup

true

初始化后是否自动启动调度程序。

spring.quartz.jdbc.comment-prefix

#, --

SQL初始化脚本中单行注释的前缀。

spring.quartz.jdbc.initialize-schema

embedded

数据库模式初始化模式。

spring.quartz.jdbc.schema

classpath:org/quartz/impl/jdbcjobstore/tables_@@platform@@.sql

用于初始化数据库模式的SQL文件的路径。

spring.quartz.job-store-type

memory

石英作业存储类型。

spring.quartz.overwrite-existing-jobs

false

配置的作业是否应覆盖现有的作业定义。

spring.quartz.properties.*

Quartz Scheduler的其他属性。

spring.quartz.scheduler-name

quartzScheduler

调度程序的名称。

spring.quartz.startup-delay

0s

初始化完成后启动调度程序的延迟时间。如果在整个应用程序启动之前不运行任何作业,则设置此属性很有意义。

spring.quartz.wait-for-jobs-to-complete-on-shutdown

false

是否等待正在关闭的正在运行的作业。

spring.reactor.debug-agent.enabled

true

存在反应器工具时是否应启用反应器调试代理。

spring.task.execution.pool.allow-core-thread-timeout

true

是否允许核心线程超时。这样可以动态增加和缩小池。

spring.task.execution.pool.core-size

8

核心线程数。

spring.task.execution.pool.keep-alive

60s

线程在终止之前可能保持空闲的时间限制。

spring.task.execution.pool.max-size

允许的最大线程数。如果任务填满队列,则池可以扩展到该大小以容纳负载。忽略队列是否无界。

spring.task.execution.pool.queue-capacity

队列容量。无限制的容量不会增加池,因此会忽略“最大大小”属性。

spring.task.execution.shutdown.await-termination

false

执行程序是否应该等待计划的任务在关闭时完成。

spring.task.execution.shutdown.await-termination-period

执行者应该等待剩余任务完成的最长时间。

spring.task.execution.thread-name-prefix

task-

用于新创建线程名称的前缀。

spring.task.scheduling.pool.size

1

允许的最大线程数。

spring.task.scheduling.shutdown.await-termination

false

执行程序是否应该等待计划的任务在关闭时完成。

spring.task.scheduling.shutdown.await-termination-period

执行者应该等待剩余任务完成的最长时间。

spring.task.scheduling.thread-name-prefix

scheduling-

用于新创建线程名称的前缀。

trace

false

启用跟踪日志。

2.缓存属性

默认值

描述

spring.cache.cache-names

如果基础缓存管理器支持,则以逗号分隔的要创建的缓存名称列表。通常,这会禁用即时创建其他缓存的功能。

spring.cache.caffeine.spec

用于创建缓存的规范。有关规范格式的更多详细信息,请参见CaffeineSpec。

spring.cache.couchbase.expiration

条目到期。默认情况下,条目永不过期。请注意,此值最终会转换为秒。

spring.cache.ehcache.config

用于初始化EhCache的配置文件的位置。

spring.cache.infinispan.config

用于初始化Infinispan的配置文件的位置。

spring.cache.jcache.config

用于初始化高速缓存管理器的配置文件的位置。配置文件取决于基础缓存的实现。

spring.cache.jcache.provider

CachingProvider实现的完全限定名称,用于检索符合JSR-107的缓存管理器。仅当类路径上有多个JSR-107实现可用时才需要。

spring.cache.redis.cache-null-values

true

允许缓存空值。

spring.cache.redis.key-prefix

密钥前缀。

spring.cache.redis.time-to-live

条目到期。默认情况下,条目永不过期。

spring.cache.redis.use-key-prefix

true

写入Redis时是否使用键前缀。

spring.cache.type

缓存类型。默认情况下,根据环境自动检测。

3.邮件属性

默认值

描述

spring.mail.default-encoding

UTF-8

默认的MimeMessage编码。

spring.mail.host

SMTP服务器主机。例如,“ smtp.example.com”。

spring.mail.jndi-name

会话JNDI名称。设置后,优先于其他会话设置。

spring.mail.password

SMTP服务器的登录密码。

spring.mail.port

SMTP服务器端口。

spring.mail.properties.*

其他JavaMail会话属性。

spring.mail.protocol

smtp

SMTP服务器使用的协议。

spring.mail.test-connection

false

是否在启动时测试邮件服务器是否可用。

spring.mail.username

SMTP服务器的登录用户。

spring.sendgrid.api-key

SendGrid API密钥。

spring.sendgrid.proxy.host

SendGrid代理主机。

spring.sendgrid.proxy.port

SendGrid代理端口。

4. JSON属性

默认值

描述

spring.gson.date-format

序列化Date对象时使用的格式。

spring.gson.disable-html-escaping

是否禁用转义HTML字符(如“ <”,“>”等)。

spring.gson.disable-inner-class-serialization

是否在序列化期间排除内部类。

spring.gson.enable-complex-map-key-serialization

是否启用序列化复杂映射键(即非原始)。

spring.gson.exclude-fields-without-expose-annotation

是否排除所有没有“ Expose”注释的字段以进行序列化或反序列化。

spring.gson.field-naming-policy

在序列化和反序列化期间应应用于对象字段的命名策略。

spring.gson.generate-non-executable-json

是否通过在输出之前添加一些特殊文本来生成不可执行的JSON。

spring.gson.lenient

是否宽容解析不符合RFC 4627的JSON。

spring.gson.long-serialization-policy

Long和long类型的序列化策略。

spring.gson.pretty-printing

是否输出适合页面的序列化JSON以进行漂亮的打印。

spring.gson.serialize-nulls

是否序列化空字段。

spring.jackson.date-format

日期格式字符串或标准日期格式类名称。例如,`yyyy-MM-dd HH:mm:ss`。

spring.jackson.default-property-inclusion

控制序列化期间属性的包含。使用Jackson的JsonInclude.Include枚举中的值之一进行配置。

spring.jackson.deserialization.*

Jackson开/关功能会影响反序列化Java对象的方式。

spring.jackson.generator.*

发电机的杰克逊开/关功能。

spring.jackson.locale

用于格式化的语言环境。

spring.jackson.mapper.*

Jackson通用开/关功能。

spring.jackson.parser.*

解析器的Jackson开/关功能。

spring.jackson.property-naming-strategy

Jackson的PropertyNamingStrategy的常量之一。也可以是PropertyNamingStrategy子类的标准类名。

spring.jackson.serialization.*

Jackson开/关功能会影响Java对象的序列化方式。

spring.jackson.time-zone

格式化日期时使用的时区。例如,“ America / Los_Angeles”或“ GMT + 10”。

spring.jackson.visibility.*

杰克逊可见性阈值可用于限制自动检测哪些方法(和字段)。

5.数据属性

默认值

描述

spring.couchbase.bootstrap-hosts

要引导的Couchbase节点(主机或IP地址)。

spring.couchbase.bucket.name

default

要连接的存储桶的名称。

spring.couchbase.bucket.password

桶的密码。

spring.couchbase.env.endpoints.key-value

1

针对键/值服务的每个节点的套接字数。

spring.couchbase.env.endpoints.queryservice.max-endpoints

1

每个节点的最大套接字数。

spring.couchbase.env.endpoints.queryservice.min-endpoints

1

每个节点的最小套接字数。

spring.couchbase.env.endpoints.viewservice.max-endpoints

1

每个节点的最大套接字数。

spring.couchbase.env.endpoints.viewservice.min-endpoints

1

每个节点的最小套接字数。

spring.couchbase.env.ssl.enabled

是否启用SSL支持。除非另有说明,否则如果提供了“ keyStore”,则自动启用。

spring.couchbase.env.ssl.key-store

持有证书的JVM密钥库的路径。

spring.couchbase.env.ssl.key-store-password

用于访问密钥库的密码。

spring.couchbase.env.timeouts.connect

5000ms

值区连线逾时。

spring.couchbase.env.timeouts.key-value

2500ms

对特定键超时执行的阻止操作。

spring.couchbase.env.timeouts.query

7500ms

N1QL查询操作超时。

spring.couchbase.env.timeouts.socket-connect

1000ms

套接字连接连接超时。

spring.couchbase.env.timeouts.view

7500ms

常规和地理空间视图操作超时。

spring.couchbase.password

使用基于角色的访问时的群集密码。

spring.couchbase.username

使用基于角色的访问时的集群用户名。

spring.dao.exceptiontranslation.enabled

true

是否启用PersistenceExceptionTranslationPostProcessor。

spring.data.cassandra.cluster-name

Cassandra集群的名称。

spring.data.cassandra.compression

none

Cassandra二进制协议支持压缩。

spring.data.cassandra.connect-timeout

套接字选项:连接超时。

spring.data.cassandra.consistency-level

查询一致性级别。

spring.data.cassandra.contact-points

localhost

集群节点地址。

spring.data.cassandra.fetch-size

查询默认获取大小。

spring.data.cassandra.jmx-enabled

false

是否启用JMX报告。默认为false,因为Cassandra JMX报告与Dropwizard Metrics不兼容。

spring.data.cassandra.keyspace-name

要使用的键空间名称。

spring.data.cassandra.password

服务器的登录密码。

spring.data.cassandra.pool.heartbeat-interval

30s

心跳间隔,在此间隔之后,将在空闲连接上发送消息以确保其仍然有效。如果未指定持续时间后缀,则将使用秒。

spring.data.cassandra.pool.idle-timeout

120s

在删除空闲连接之前,空闲超时。如果未指定持续时间后缀,则将使用秒。

spring.data.cassandra.pool.max-queue-size

256

如果没有可用的连接,则排队的最大请求数。

spring.data.cassandra.pool.pool-timeout

5000ms

尝试从主机的池中获取连接时,池超时。

spring.data.cassandra.port

Cassandra服务器的端口。

spring.data.cassandra.read-timeout

套接字选项:读取超时。

spring.data.cassandra.repositories.type

auto

要启用的Cassandra存储库的类型。

spring.data.cassandra.schema-action

none

启动时要执行的架构操作。

spring.data.cassandra.serial-consistency-level

查询序列一致性级别。

spring.data.cassandra.ssl

false

启用S​​SL支持。

spring.data.cassandra.username

服务器的登录用户。

spring.data.couchbase.auto-index

false

自动创建视图和索引。使用“ @ViewIndexed”,“ @ N1qlPrimaryIndexed”和“ @ N1qlSecondaryIndexed”提供的元数据。

spring.data.couchbase.consistency

read-your-own-writes

一致性,默认情况下应用于生成的查询。

spring.data.couchbase.repositories.type

auto

要启用的Couchbase存储库的类型。

spring.data.elasticsearch.client.reactive.connection-timeout

连接超时。

spring.data.elasticsearch.client.reactive.endpoints

要连接到的Elasticsearch端点的逗号分隔列表。

spring.data.elasticsearch.client.reactive.password

凭证密码。

spring.data.elasticsearch.client.reactive.socket-timeout

读写套接字超时。

spring.data.elasticsearch.client.reactive.use-ssl

false

客户端是否应使用SSL连接到端点。

spring.data.elasticsearch.client.reactive.username

凭证用户名。

spring.data.elasticsearch.repositories.enabled

true

是否启用Elasticsearch存储库。

spring.data.jdbc.repositories.enabled

true

是否启用JDBC存储库。

spring.data.jpa.repositories.bootstrap-mode

default

JPA存储库的引导方式。

spring.data.jpa.repositories.enabled

true

是否启用JPA存储库。

spring.data.ldap.repositories.enabled

true

是否启用LDAP存储库。

spring.data.mongodb.authentication-database

认证数据库名称。

spring.data.mongodb.auto-index-creation

是否启用自动索引创建。

spring.data.mongodb.database

数据库名称。

spring.data.mongodb.field-naming-strategy

要使用的FieldNamingStrategy的完全限定名称。

spring.data.mongodb.grid-fs-database

GridFS数据库名称。

spring.data.mongodb.host

Mongo服务器主机。无法使用URI设置。

spring.data.mongodb.password

mongo服务器的登录密码。无法使用URI设置。

spring.data.mongodb.port

Mongo服务器端口。无法使用URI设置。

spring.data.mongodb.repositories.type

auto

要启用的Mongo存储库类型。

spring.data.mongodb.uri

mongodb://localhost/test

Mongo数据库URI。无法使用主机,端口和凭据进行设置。

spring.data.mongodb.username

mongo服务器的登录用户。无法使用URI设置。

spring.data.neo4j.auto-index

none

自动索引模式。

spring.data.neo4j.embedded.enabled

true

如果嵌入式驱动程序可用,是否启用嵌入式模式。

spring.data.neo4j.open-in-view

true

注册OpenSessionInViewInterceptor。将Neo4j会话绑定到线程以完成请求的整个处理。”,

spring.data.neo4j.password

服务器的登录密码。

spring.data.neo4j.repositories.enabled

true

是否启用Neo4j存储库。

spring.data.neo4j.uri

驱动程序使用的URI。默认情况下自动检测。

spring.data.neo4j.use-native-types

false

是否尽可能使用Neo4j本机类型。

spring.data.neo4j.username

服务器的登录用户。

spring.data.redis.repositories.enabled

true

是否启用Redis存储库。

spring.data.rest.base-path

Spring Data REST用于公开存储库资源的基本路径。

spring.data.rest.default-media-type

如果未指定内容类型,则默认使用该内容类型。

spring.data.rest.default-page-size

页面的默认大小。

spring.data.rest.detection-strategy

default

spring.data.rest.enable-enum-translation

是否通过Spring Data REST默认资源包启用枚举值转换。

spring.data.rest.limit-param-name

URL查询字符串参数的名称,该参数指示一次返回多少结果。

spring.data.rest.max-page-size

页面的最大大小。

spring.data.rest.page-param-name

URL查询字符串参数的名称,该参数指示要返回的页面。

spring.data.rest.return-body-on-create

创建实体后是否返回响应主体。

spring.data.rest.return-body-on-update

更新实体后是否返回响应主体。

spring.data.rest.sort-param-name

URL查询字符串参数的名称,指示对结果进行排序的方向。

spring.data.solr.host

http://127.0.0.1:8983/solr

Solr主机。忽略是否​​设置了“ zk-host”。

spring.data.solr.repositories.enabled

true

是否启用Solr存储库。

spring.data.solr.zk-host

ZooKeeper主机地址,格式为HOST:PORT。

spring.data.web.pageable.default-page-size

20

默认页面大小。

spring.data.web.pageable.max-page-size

2000

可接受的最大页面大小。

spring.data.web.pageable.one-indexed-parameters

false

是否公开并假定基于1的页码索引。默认为“ false”,表示请求中的页数0等于第一页。

spring.data.web.pageable.page-parameter

page

页面索引参数名称。

spring.data.web.pageable.prefix

页码和页面大小参数之前的通用前缀。

spring.data.web.pageable.qualifier-delimiter

_

在限定符与实际页码和大小属性之间使用定界符。

spring.data.web.pageable.size-parameter

size

页面大小参数名称。

spring.data.web.sort.sort-parameter

sort

排序参数名称。

spring.datasource.continue-on-error

false

如果初始化数据库时发生错误,是否停止。

spring.datasource.data

数据(DML)脚本资源引用。

spring.datasource.data-password

执行DML脚本的数据库的密码(如果不同)。

spring.datasource.data-username

执行DML脚本的数据库的用户名(如果有)。

spring.datasource.dbcp2.abandoned-usage-trackingspring.datasource.dbcp2.access-to-underlying-connection-allowedspring.datasource.dbcp2.auto-commit-on-returnspring.datasource.dbcp2.cache-statespring.datasource.dbcp2.connection-factory-class-namespring.datasource.dbcp2.connection-init-sqlsspring.datasource.dbcp2.default-auto-commitspring.datasource.dbcp2.default-catalogspring.datasource.dbcp2.default-query-timeoutspring.datasource.dbcp2.default-read-onlyspring.datasource.dbcp2.default-schemaspring.datasource.dbcp2.default-transaction-isolationspring.datasource.dbcp2.disconnection-sql-codesspring.datasource.dbcp2.driverspring.datasource.dbcp2.driver-class-namespring.datasource.dbcp2.eviction-policy-class-namespring.datasource.dbcp2.fast-fail-validationspring.datasource.dbcp2.initial-sizespring.datasource.dbcp2.jmx-namespring.datasource.dbcp2.lifospring.datasource.dbcp2.log-abandonedspring.datasource.dbcp2.log-expired-connectionsspring.datasource.dbcp2.login-timeoutspring.datasource.dbcp2.max-conn-lifetime-millisspring.datasource.dbcp2.max-idlespring.datasource.dbcp2.max-open-prepared-statementsspring.datasource.dbcp2.max-totalspring.datasource.dbcp2.max-wait-millisspring.datasource.dbcp2.min-evictable-idle-time-millisspring.datasource.dbcp2.min-idlespring.datasource.dbcp2.num-tests-per-eviction-runspring.datasource.dbcp2.passwordspring.datasource.dbcp2.pool-prepared-statementsspring.datasource.dbcp2.remove-abandoned-on-borrowspring.datasource.dbcp2.remove-abandoned-on-maintenancespring.datasource.dbcp2.remove-abandoned-timeoutspring.datasource.dbcp2.rollback-on-returnspring.datasource.dbcp2.soft-min-evictable-idle-time-millisspring.datasource.dbcp2.test-on-borrowspring.datasource.dbcp2.test-on-createspring.datasource.dbcp2.test-on-returnspring.datasource.dbcp2.test-while-idlespring.datasource.dbcp2.time-between-eviction-runs-millisspring.datasource.dbcp2.urlspring.datasource.dbcp2.usernamespring.datasource.dbcp2.validation-queryspring.datasource.dbcp2.validation-query-timeout

Commons DBCP2特定设置

spring.datasource.driver-class-name

JDBC驱动程序的全限定名称。默认情况下根据URL自动检测。

spring.datasource.generate-unique-name

false

是否生成随机数据源名称。

spring.datasource.hikari.allow-pool-suspensionspring.datasource.hikari.auto-commitspring.datasource.hikari.catalogspring.datasource.hikari.connection-init-sqlspring.datasource.hikari.connection-test-queryspring.datasource.hikari.connection-timeoutspring.datasource.hikari.data-source-class-namespring.datasource.hikari.data-source-j-n-d-ispring.datasource.hikari.data-source-propertiesspring.datasource.hikari.driver-class-namespring.datasource.hikari.health-check-propertiesspring.datasource.hikari.health-check-registryspring.datasource.hikari.idle-timeoutspring.datasource.hikari.initialization-fail-timeoutspring.datasource.hikari.isolate-internal-queriesspring.datasource.hikari.jdbc-urlspring.datasource.hikari.leak-detection-thresholdspring.datasource.hikari.login-timeoutspring.datasource.hikari.max-lifetimespring.datasource.hikari.maximum-pool-sizespring.datasource.hikari.metric-registryspring.datasource.hikari.metrics-tracker-factoryspring.datasource.hikari.minimum-idlespring.datasource.hikari.passwordspring.datasource.hikari.pool-namespring.datasource.hikari.read-onlyspring.datasource.hikari.register-mbeansspring.datasource.hikari.scheduled-executorspring.datasource.hikari.schemaspring.datasource.hikari.transaction-isolationspring.datasource.hikari.usernamespring.datasource.hikari.validation-timeout

光的特定设置

spring.datasource.initialization-mode

embedded

spring.datasource.jndi-name

数据源的JNDI位置。设置时将忽略类,URL,用户名和密码。

spring.datasource.name

数据源的名称。使用嵌入式数据库时,默认为“ testdb”。

spring.datasource.password

数据库的登录密码。

spring.datasource.platform

all

在DDL或DML脚本中使用的平台(例如schema-$ {platform} .sql或data-$ {platform} .sql)。

spring.datasource.schema

架构(DDL)脚本资源引用。

spring.datasource.schema-password

执行DDL脚本的数据库的密码(如果有)。

spring.datasource.schema-username

执行DDL脚本的数据库的用户名(如果有)。

spring.datasource.separator

;

SQL初始化脚本中的语句分隔符。

spring.datasource.sql-script-encoding

SQL脚本编码。

spring.datasource.tomcat.abandon-when-percentage-fullspring.datasource.tomcat.access-to-underlying-connection-allowedspring.datasource.tomcat.alternate-username-allowedspring.datasource.tomcat.commit-on-returnspring.datasource.tomcat.connection-propertiesspring.datasource.tomcat.data-sourcespring.datasource.tomcat.data-source-j-n-d-ispring.datasource.tomcat.db-propertiesspring.datasource.tomcat.default-auto-commitspring.datasource.tomcat.default-catalogspring.datasource.tomcat.default-read-onlyspring.datasource.tomcat.default-transaction-isolationspring.datasource.tomcat.driver-class-namespring.datasource.tomcat.fair-queuespring.datasource.tomcat.ignore-exception-on-pre-loadspring.datasource.tomcat.init-s-q-lspring.datasource.tomcat.initial-sizespring.datasource.tomcat.jdbc-interceptorsspring.datasource.tomcat.jmx-enabledspring.datasource.tomcat.log-abandonedspring.datasource.tomcat.log-validation-errorsspring.datasource.tomcat.login-timeoutspring.datasource.tomcat.max-activespring.datasource.tomcat.max-agespring.datasource.tomcat.max-idlespring.datasource.tomcat.max-waitspring.datasource.tomcat.min-evictable-idle-time-millisspring.datasource.tomcat.min-idlespring.datasource.tomcat.namespring.datasource.tomcat.num-tests-per-eviction-runspring.datasource.tomcat.passwordspring.datasource.tomcat.propagate-interrupt-statespring.datasource.tomcat.remove-abandonedspring.datasource.tomcat.remove-abandoned-timeoutspring.datasource.tomcat.rollback-on-returnspring.datasource.tomcat.suspect-timeoutspring.datasource.tomcat.test-on-borrowspring.datasource.tomcat.test-on-connectspring.datasource.tomcat.test-on-returnspring.datasource.tomcat.test-while-idlespring.datasource.tomcat.time-between-eviction-runs-millisspring.datasource.tomcat.urlspring.datasource.tomcat.use-disposable-connection-facadespring.datasource.tomcat.use-equalsspring.datasource.tomcat.use-lockspring.datasource.tomcat.use-statement-facadespring.datasource.tomcat.usernamespring.datasource.tomcat.validation-intervalspring.datasource.tomcat.validation-queryspring.datasource.tomcat.validation-query-timeoutspring.datasource.tomcat.validator-class-name

Tomcat数据源特定设置

spring.datasource.type

要使用的连接池实现的完全限定名称。默认情况下,它是从类路径中自动检测到的。

spring.datasource.url

数据库的JDBC URL。

spring.datasource.username

数据库的登录用户名。

spring.datasource.xa.data-source-class-name

XA数据源的完全限定名称。

spring.datasource.xa.properties.*

传递给XA数据源的属性。

spring.elasticsearch.jest.connection-timeout

3s

连接超时。

spring.elasticsearch.jest.multi-threaded

true

是否启用来自多个执行线程的连接请求。

spring.elasticsearch.jest.password

登录密码。

spring.elasticsearch.jest.proxy.host

HTTP客户端应使用的代理主机。

spring.elasticsearch.jest.proxy.port

HTTP客户端应使用的代理端口。

spring.elasticsearch.jest.read-timeout

3s

读取超时。

spring.elasticsearch.jest.username

登录用户名。

spring.elasticsearch.rest.connection-timeout

1s

连接超时。

spring.elasticsearch.rest.password

凭证密码。

spring.elasticsearch.rest.read-timeout

30s

读取超时。

spring.elasticsearch.rest.uris

http://localhost:9200

spring.elasticsearch.rest.username

凭证用户名。

spring.h2.console.enabled

false

是否启用控制台。

spring.h2.console.path

/h2-console

控制台可用的路径。

spring.h2.console.settings.trace

false

是否启用跟踪输出。

spring.h2.console.settings.web-allow-others

false

是否启用远程访问。

spring.influx.password

登录密码。

spring.influx.url

要连接的InfluxDB实例的URL。

spring.influx.user

Login user.

spring.jdbc.template.fetch-size

-1

Number of rows that should be fetched from the database when more rows are needed. Use -1 to use the JDBC driver's default configuration.

spring.jdbc.template.max-rows

-1

Maximum number of rows. Use -1 to use the JDBC driver's default configuration.

spring.jdbc.template.query-timeout

Query timeout. Default is to use the JDBC driver's default configuration. If a duration suffix is not specified, seconds will be used.

spring.jooq.sql-dialect

SQL dialect to use. Auto-detected by default.

spring.jpa.database

Target database to operate on, auto-detected by default. Can be alternatively set using the "databasePlatform" property.

spring.jpa.database-platform

Name of the target database to operate on, auto-detected by default. Can be alternatively set using the "Database" enum.

spring.jpa.generate-ddl

false

Whether to initialize the schema on startup.

spring.jpa.hibernate.ddl-auto

DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property. Defaults to "create-drop" when using an embedded database and no schema manager was detected. Otherwise, defaults to "none".

spring.jpa.hibernate.naming.implicit-strategy

Fully qualified name of the implicit naming strategy.

spring.jpa.hibernate.naming.physical-strategy

Fully qualified name of the physical naming strategy.

spring.jpa.hibernate.use-new-id-generator-mappings

Whether to use Hibernate's newer IdentifierGenerator for AUTO, TABLE and SEQUENCE. This is actually a shortcut for the "hibernate.id.new_generator_mappings" property. When not specified will default to "true".

spring.jpa.mapping-resources

Mapping resources (equivalent to "mapping-file" entries in persistence.xml).

spring.jpa.open-in-view

true

Register OpenEntityManagerInViewInterceptor. Binds a JPA EntityManager to the thread for the entire processing of the request.

spring.jpa.properties.*

Additional native properties to set on the JPA provider.

spring.jpa.show-sql

false

是否启用SQL语句的日志记录。

spring.mongodb.embedded.features

sync_delay

spring.mongodb.embedded.storage.database-dir

用于数据存储的目录。

spring.mongodb.embedded.storage.oplog-size

操作日志的最大大小。

spring.mongodb.embedded.storage.repl-set-name

副本集的名称。

spring.mongodb.embedded.version

3.5.5

要使用的Mongo版本。

spring.redis.client-name

在与CLIENT SETNAME的连接上设置的客户端名称。

spring.redis.cluster.max-redirects

在整个集群中执行命令时要遵循的最大重定向数。

spring.redis.cluster.nodes

以逗号分隔的“ host:port”对列表,用于引导。这表示群集节点的“初始”列表,并且要求至少具有一个条目。

spring.redis.database

0

连接工厂使用的数据库索引。

spring.redis.host

localhost

Redis服务器主机。

spring.redis.jedis.pool.max-active

8

池在给定时间可以分配的最大连接数。使用负值表示没有限制。

spring.redis.jedis.pool.max-idle

8

池中“空闲”连接的最大数量。使用负值表示无限数量的空闲连接。

spring.redis.jedis.pool.max-wait

-1ms

当池耗尽时,在引发异常之前,连接分配应阻塞的最长时间。使用负值无限期阻止。

spring.redis.jedis.pool.min-idle

0

目标是要在池中维护的最小空闲连接数。仅当此设置和逐次运行之间的时间都为正时,此设置才有效。

spring.redis.jedis.pool.time-between-eviction-runs

空闲对象退出线程的运行之间的时间。当为正时,空闲对象逐出线程启动,否则不执行空闲对象逐出。

spring.redis.lettuce.pool.max-active

8

池在给定时间可以分配的最大连接数。使用负值表示没有限制。

spring.redis.lettuce.pool.max-idle

8

池中“空闲”连接的最大数量。使用负值表示无限数量的空闲连接。

spring.redis.lettuce.pool.max-wait

-1ms

当池耗尽时,在引发异常之前,连接分配应阻塞的最长时间。使用负值无限期阻止。

spring.redis.lettuce.pool.min-idle

0

目标是要在池中维护的最小空闲连接数。仅当此设置和逐次运行之间的时间都为正时,此设置才有效。

spring.redis.lettuce.pool.time-between-eviction-runs

空闲对象退出线程的运行之间的时间。当为正时,空闲对象逐出线程启动,否则不执行空闲对象逐出。

spring.redis.lettuce.shutdown-timeout

100ms

关机超时。

spring.redis.password

Redis服务器的登录密码。

spring.redis.port

6379

Redis服务器端口。

spring.redis.sentinel.master

Redis服务器名称。

spring.redis.sentinel.nodes

以逗号分隔的“ host:port”对列表。

spring.redis.ssl

false

是否启用SSL支持。

spring.redis.timeout

连接超时。

spring.redis.url

连接URL。覆盖主机,端口和密码。用户被忽略。范例:redis://使用者:password@example.com :6379

本文系外文翻译,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系外文翻译前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 1.核心属性
  • 2.缓存属性
  • 3.邮件属性
  • 4. JSON属性
  • 5.数据属性
相关产品与服务
云数据库 MongoDB
腾讯云数据库 MongoDB(TencentDB for MongoDB)是腾讯云基于全球广受欢迎的 MongoDB 打造的高性能 NoSQL 数据库,100%完全兼容 MongoDB 协议,支持跨文档事务,提供稳定丰富的监控管理,弹性可扩展、自动容灾,适用于文档型数据库场景,您无需自建灾备体系及控制管理系统。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档