Springboot 配置通用文件模板

来源:互联网 发布:华伦夫妇知乎 编辑:程序博客网 时间:2024/04/25 08:28

Spring boot默认配置的文件模板如下:

001 # ===================================================================002 # COMMON SPRING BOOT PROPERTIES003 #004 # This sample file is provided as a guideline. Do NOT copy it in its005 # entirety to your own application.               ^^^006 # ===================================================================007 008 # ----------------------------------------009 # CORE PROPERTIES010 # ----------------------------------------011 012 # SPRING CONFIG (ConfigFileApplicationListener)013 spring.config.name= # 指定配置文件名称 (default to 'application')014 spring.config.location= # 配置文件地址015 016 # PROFILES017 spring.profiles= # comma list of active profiles018 019 # APPLICATION SETTINGS (SpringApplication)020 spring.main.sources=021 spring.main.web-environment= # detect by default022 spring.main.show-banner=true023 spring.main....= # see class for all properties024 025 # LOGGING026 logging.path=/var/logs027 logging.file=myapp.log028 logging.config=029 030 # IDENTITY (ContextIdApplicationContextInitializer)031 spring.application.name=032 spring.application.index=033 034 # EMBEDDED SERVER CONFIGURATION (ServerProperties)035 server.port=8080036 server.address= # bind to a specific NIC037 server.session-timeout= # session timeout in seconds038 server.context-path= # the context path, defaults to '/'039 server.servlet-path= # the servlet path, defaults to '/'040 server.tomcat.access-log-pattern= # log pattern of the access log041 server.tomcat.access-log-enabled=false # is access logging enabled042 server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers043 server.tomcat.remote-ip-header=x-forwarded-for044 server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)045 server.tomcat.background-processor-delay=30; # in seconds046 server.tomcat.max-threads = 0 # number of threads in protocol handler047 server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding048 049 # SPRING MVC (HttpMapperProperties)050 http.mappers.json-pretty-print=false # pretty print JSON051 http.mappers.json-sort-keys=false # sort keys052 spring.mvc.locale= # set fixed locale, e.g. en_UK053 spring.mvc.date-format= # set fixed date format, e.g. dd/MM/yyyy054 spring.mvc.message-codes-resolver-format= # PREFIX_ERROR_CODE / POSTFIX_ERROR_CODE055 spring.view.prefix= # MVC view prefix056 spring.view.suffix= # ... and suffix057 spring.resources.cache-period= # cache timeouts in headers sent to browser058 spring.resources.add-mappings=true # if default mappings should be added059 060 # THYMELEAF (ThymeleafAutoConfiguration)061 spring.thymeleaf.prefix=classpath:/templates/062 spring.thymeleaf.suffix=.html063 spring.thymeleaf.mode=HTML5064 spring.thymeleaf.encoding=UTF-8065 spring.thymeleaf.content-type=text/html # ;charset=<encoding> is added066 spring.thymeleaf.cache=true # set to false for hot refresh067 068 # FREEMARKER (FreeMarkerAutoConfiguration)069 spring.freemarker.allowRequestOverride=false070 spring.freemarker.allowSessionOverride=false071 spring.freemarker.cache=true072 spring.freemarker.checkTemplateLocation=true073 spring.freemarker.contentType=text/html074 spring.freemarker.exposeRequestAttributes=false075 spring.freemarker.exposeSessionAttributes=false076 spring.freemarker.exposeSpringMacroHelpers=false077 spring.freemarker.prefix=078 spring.freemarker.requestContextAttribute=079 spring.freemarker.settings.*=080 spring.freemarker.suffix=.ftl081 spring.freemarker.templateEncoding=UTF-8082 spring.freemarker.templateLoaderPath=classpath:/templates/083 spring.freemarker.viewNames= # whitelist of view names that can be resolved084 085 # GROOVY TEMPLATES (GroovyTemplateAutoConfiguration)086 spring.groovy.template.allowRequestOverride=false087 spring.groovy.template.allowSessionOverride=false088 spring.groovy.template.cache=true089 spring.groovy.template.configuration.*= # See Groovy's TemplateConfiguration090 spring.groovy.template.contentType=text/html091 spring.groovy.template.prefix=classpath:/templates/092 spring.groovy.template.suffix=.tpl093 spring.groovy.template.templateEncoding=UTF-8094 spring.groovy.template.viewNames= # whitelist of view names that can be resolved095 096 # VELOCITY TEMPLATES (VelocityAutoConfiguration)097 spring.velocity.allowRequestOverride=false098 spring.velocity.allowSessionOverride=false099 spring.velocity.cache=true100 spring.velocity.checkTemplateLocation=true101 spring.velocity.contentType=text/html102 spring.velocity.dateToolAttribute=103 spring.velocity.exposeRequestAttributes=false104 spring.velocity.exposeSessionAttributes=false105 spring.velocity.exposeSpringMacroHelpers=false106 spring.velocity.numberToolAttribute=107 spring.velocity.prefix=108 spring.velocity.properties.*=109 spring.velocity.requestContextAttribute=110 spring.velocity.resourceLoaderPath=classpath:/templates/111 spring.velocity.suffix=.vm112 spring.velocity.templateEncoding=UTF-8113 spring.velocity.viewNames= # whitelist of view names that can be resolved114 115 # INTERNATIONALIZATION (MessageSourceAutoConfiguration)116 spring.messages.basename=messages117 spring.messages.cacheSeconds=-1118 spring.messages.encoding=UTF-8119 120 121 # SECURITY (SecurityProperties)122 security.user.name=user # login username123 security.user.password= # login password124 security.user.role=USER # role assigned to the user125 security.require-ssl=false # advanced settings ...126 security.enable-csrf=false127 security.basic.enabled=true128 security.basic.realm=Spring129 security.basic.path= # /**130 security.headers.xss=false131 security.headers.cache=false132 security.headers.frame=false133 security.headers.contentType=false134 security.headers.hsts=all # none / domain / all135 security.sessions=stateless # always / never / if_required / stateless136 security.ignored=false137 138 # DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)139 spring.datasource.name= # name of the data source140 spring.datasource.initialize=true # populate using data.sql141 spring.datasource.schema= # a schema (DDL) script resource reference142 spring.datasource.data= # a data (DML) script resource reference143 spring.datasource.platform= # the platform to use in the schema resource (schema-${platform}.sql)144 spring.datasource.continueOnError=false # continue even if can't be initialized145 spring.datasource.separator=; # statement separator in SQL initialization scripts146 spring.datasource.driverClassName= # JDBC Settings...147 spring.datasource.url=148 spring.datasource.username=149 spring.datasource.password=150 spring.datasource.max-active=100 # Advanced configuration...151 spring.datasource.max-idle=8152 spring.datasource.min-idle=8153 spring.datasource.initial-size=10154 spring.datasource.validation-query=155 spring.datasource.test-on-borrow=false156 spring.datasource.test-on-return=false157 spring.datasource.test-while-idle=158 spring.datasource.time-between-eviction-runs-millis=159 spring.datasource.min-evictable-idle-time-millis=160 spring.datasource.max-wait-millis=161 162 # MONGODB (MongoProperties)163 spring.data.mongodb.host= # the db host164 spring.data.mongodb.port=27017 # the connection port (defaults to 27107)165 spring.data.mongodb.uri=mongodb://localhost/test # connection URL166 spring.data.mongo.repositories.enabled=true # if spring data repository support is enabled167 168 # JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)169 spring.jpa.properties.*= # properties to set on the JPA connection170 spring.jpa.openInView=true171 spring.jpa.show-sql=true172 spring.jpa.database-platform=173 spring.jpa.database=174 spring.jpa.generate-ddl=false # ignored by Hibernate, might be useful for other vendors175 spring.jpa.hibernate.naming-strategy= # naming classname176 spring.jpa.hibernate.ddl-auto= # defaults to create-drop for embedded dbs177 spring.data.jpa.repositories.enabled=true # if spring data repository support is enabled178 179 # SOLR (SolrProperties})180 spring.data.solr.host=http://127.0.0.1:8983/solr181 spring.data.solr.zkHost=182 spring.data.solr.repositories.enabled=true # if spring data repository support is enabled183 184 # ELASTICSEARCH (ElasticsearchProperties})185 spring.data.elasticsearch.cluster-name= # The cluster name (defaults to elasticsearch)186 spring.data.elasticsearch.cluster-nodes= # The address(es) of the server node (comma-separated; if not specified starts a client node)187 spring.data.elasticsearch.local=true # if local mode should be used with client nodes188 spring.data.elasticsearch.repositories.enabled=true # if spring data repository support is enabled189 190 191 192 # FLYWAY (FlywayProperties)193 flyway.locations=classpath:db/migrations # locations of migrations scripts194 flyway.schemas= # schemas to update195 flyway.initVersion= 1 # version to start migration196 flyway.prefix=V197 flyway.suffix=.sql198 flyway.enabled=true199 flyway.url= # JDBC url if you want Flyway to create its own DataSource200 flyway.user= # JDBC username if you want Flyway to create its own DataSource201 flyway.password= # JDBC password if you want Flyway to create its own DataSource202 203 # LIQUIBASE (LiquibaseProperties)204 liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml205 liquibase.contexts= # runtime contexts to use206 liquibase.default-schema= # default database schema to use207 liquibase.drop-first=false208 liquibase.enabled=true209 210 # JMX211 spring.jmx.enabled=true # Expose MBeans from Spring212 213 # RABBIT (RabbitProperties)214 spring.rabbitmq.host= # connection host215 spring.rabbitmq.port= # connection port216 spring.rabbitmq.addresses= # connection addresses (e.g. myhost:9999,otherhost:1111)217 spring.rabbitmq.username= # login user218 spring.rabbitmq.password= # login password219 spring.rabbitmq.virtualhost=220 spring.rabbitmq.dynamic=221 222 # REDIS (RedisProperties)223 spring.redis.host=localhost # server host224 spring.redis.password= # server password225 spring.redis.port=6379 # connection port226 spring.redis.pool.max-idle=8 # pool settings ...227 spring.redis.pool.min-idle=0228 spring.redis.pool.max-active=8229 spring.redis.pool.max-wait=-1230 231 # ACTIVEMQ (ActiveMQProperties)232 spring.activemq.broker-url=tcp://localhost:61616 # connection URL233 spring.activemq.user=234 spring.activemq.password=235 spring.activemq.in-memory=true # broker kind to create if no broker-url is specified236 spring.activemq.pooled=false237 238 # HornetQ (HornetQProperties)239 spring.hornetq.mode= # connection mode (native, embedded)240 spring.hornetq.host=localhost # hornetQ host (native mode)241 spring.hornetq.port=5445 # hornetQ port (native mode)242 spring.hornetq.embedded.enabled=true # if the embedded server is enabled (needs hornetq-jms-server.jar)243 spring.hornetq.embedded.serverId= # auto-generated id of the embedded server (integer)244 spring.hornetq.embedded.persistent=false # message persistence245 spring.hornetq.embedded.data-directory= # location of data content (when persistence is enabled)246 spring.hornetq.embedded.queues= # comma separate queues to create on startup247 spring.hornetq.embedded.topics= # comma separate topics to create on startup248 spring.hornetq.embedded.cluster-password= # customer password (randomly generated by default)249 250 # JMS (JmsProperties)251 spring.jms.pub-sub-domain= # false for queue (default), true for topic252 253 # SPRING BATCH (BatchDatabaseInitializer)254 spring.batch.job.names=job1,job2255 spring.batch.job.enabled=true256 spring.batch.initializer.enabled=true257 spring.batch.schema= # batch schema to load258 259 # AOP260 spring.aop.auto=261 spring.aop.proxy-target-class=262 263 # FILE ENCODING (FileEncodingApplicationListener)264 spring.mandatory-file-encoding=false265 266 # SPRING SOCIAL (SocialWebAutoConfiguration)267 spring.social.auto-connection-views=true # Set to true for default connection views or false if you provide your own268 269 # SPRING SOCIAL FACEBOOK (FacebookAutoConfiguration)270 spring.social.facebook.app-id= # your application's Facebook App ID271 spring.social.facebook.app-secret= # your application's Facebook App Secret272 273 # SPRING SOCIAL LINKEDIN (LinkedInAutoConfiguration)274 spring.social.linkedin.app-id= # your application's LinkedIn App ID275 spring.social.linkedin.app-secret= # your application's LinkedIn App Secret276 277 # SPRING SOCIAL TWITTER (TwitterAutoConfiguration)278 spring.social.twitter.app-id= # your application's Twitter App ID279 spring.social.twitter.app-secret= # your application's Twitter App Secret280 281 # SPRING MOBILE SITE PREFERENCE (SitePreferenceAutoConfiguration)282 spring.mobile.sitepreference.enabled=true # enabled by default283 284 # SPRING MOBILE DEVICE VIEWS (DeviceDelegatingViewResolverAutoConfiguration)285 spring.mobile.devicedelegatingviewresolver.enabled=true # disabled by default286 spring.mobile.devicedelegatingviewresolver.normalPrefix=287 spring.mobile.devicedelegatingviewresolver.normalSuffix=288 spring.mobile.devicedelegatingviewresolver.mobilePrefix=mobile/289 spring.mobile.devicedelegatingviewresolver.mobileSuffix=290 spring.mobile.devicedelegatingviewresolver.tabletPrefix=tablet/291 spring.mobile.devicedelegatingviewresolver.tabletSuffix=292 293 # ----------------------------------------294 # ACTUATOR PROPERTIES295 # ----------------------------------------296 297 # MANAGEMENT HTTP SERVER (ManagementServerProperties)298 management.port= # defaults to 'server.port'299 management.address= # bind to a specific NIC300 management.contextPath= # default to '/'301 302 # ENDPOINTS (AbstractEndpoint subclasses)303 endpoints.autoconfig.id=autoconfig304 endpoints.autoconfig.sensitive=true305 endpoints.autoconfig.enabled=true306 endpoints.beans.id=beans307 endpoints.beans.sensitive=true308 endpoints.beans.enabled=true309 endpoints.configprops.id=configprops310 endpoints.configprops.sensitive=true311 endpoints.configprops.enabled=true312 endpoints.configprops.keys-to-sanitize=password,secret313 endpoints.dump.id=dump314 endpoints.dump.sensitive=true315 endpoints.dump.enabled=true316 endpoints.env.id=env317 endpoints.env.sensitive=true318 endpoints.env.enabled=true319 endpoints.health.id=health320 endpoints.health.sensitive=false321 endpoints.health.enabled=true322 endpoints.info.id=info323 endpoints.info.sensitive=false324 endpoints.info.enabled=true325 endpoints.metrics.id=metrics326 endpoints.metrics.sensitive=true327 endpoints.metrics.enabled=true328 endpoints.shutdown.id=shutdown329 endpoints.shutdown.sensitive=true330 endpoints.shutdown.enabled=false331 endpoints.trace.id=trace332 endpoints.trace.sensitive=true333 endpoints.trace.enabled=true334 335 # MVC ONLY ENDPOINTS336 endpoints.jolokia.path=jolokia337 endpoints.jolokia.sensitive=true338 endpoints.jolokia.enabled=true # when using Jolokia339 endpoints.error.path=/error340 341 # JMX ENDPOINT (EndpointMBeanExportProperties)342 endpoints.jmx.enabled=true343 endpoints.jmx.domain= # the JMX domain, defaults to 'org.springboot'344 endpoints.jmx.unique-names=false345 endpoints.jmx.enabled=true346 endpoints.jmx.staticNames=347 348 # JOLOKIA (JolokiaProperties)349 jolokia.config.*= # See Jolokia manual350 351 # REMOTE SHELL352 shell.auth=simple # jaas, key, simple, spring353 shell.command-refresh-interval=-1354 shell.command-path-pattern= # classpath*:/commands/**, classpath*:/crash/commands/**355 shell.config-path-patterns= # classpath*:/crash/*356 shell.disabled-plugins=false # don't expose plugins357 shell.ssh.enabled= # ssh settings ...358 shell.ssh.keyPath=359 shell.ssh.port=360 shell.telnet.enabled= # telnet settings ...361 shell.telnet.port=362 shell.auth.jaas.domain= # authentication settings ...363 shell.auth.key.path=364 shell.auth.simple.user.name=365 shell.auth.simple.user.password=366 shell.auth.spring.roles=367 368 # GIT INFO369 spring.git.properties= # resource ref to generated git info properties file
0 0