spring boot application properties配置详解

来源:互联网 发布:磁盘删除分区linux 编辑:程序博客网 时间:2024/05/21 07:10
  1. 转载地址:转载出处

  2. # ===================================================================  
  3. # COMMON SPRING BOOT PROPERTIES  
  4. #  
  5. # This sample file is provided as a guideline. Do NOT copy it in its  
  6. # entirety to your own application.               ^^^  
  7. # ===================================================================  
  8.   
  9. # ----------------------------------------  
  10. # CORE PROPERTIES  
  11. # ----------------------------------------  
  12.   
  13. # SPRING CONFIG (ConfigFileApplicationListener)  
  14. spring.config.name= # config file name (default to 'application')  
  15. spring.config.location= # location of config file  
  16.   
  17. # PROFILES  
  18. spring.profiles= # comma list of active profiles  
  19.   
  20. # APPLICATION SETTINGS (SpringApplication)  
  21. spring.main.sources=  
  22. spring.main.web-environment= # detect by default  
  23. spring.main.show-banner=true  
  24. spring.main....= # see class for all properties  
  25.   
  26. # LOGGING  
  27. logging.path=/var/logs  
  28. logging.file=myapp.log  
  29. logging.config=  
  30.   
  31. # IDENTITY (ContextIdApplicationContextInitializer)  
  32. spring.application.name=  
  33. spring.application.index=  
  34.   
  35. # EMBEDDED SERVER CONFIGURATION (ServerProperties)  
  36. server.port=8080  
  37. server.address= # bind to a specific NIC  
  38. server.session-timeout= # session timeout in seconds  
  39. server.context-path= # the context path, defaults to '/'  
  40. server.servlet-path= # the servlet path, defaults to '/'  
  41. server.tomcat.access-log-pattern= # log pattern of the access log  
  42. server.tomcat.access-log-enabled=false # is access logging enabled  
  43. server.tomcat.protocol-header=x-forwarded-proto # ssl forward headers  
  44. server.tomcat.remote-ip-header=x-forwarded-for  
  45. server.tomcat.basedir=/tmp # base dir (usually not needed, defaults to tmp)  
  46. server.tomcat.background-processor-delay=30; # in seconds  
  47. server.tomcat.max-threads = 0 # number of threads in protocol handler  
  48. server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding  
  49.   
  50. # SPRING MVC (HttpMapperProperties)  
  51. http.mappers.json-pretty-print=false # pretty print JSON  
  52. http.mappers.json-sort-keys=false # sort keys  
  53. spring.mvc.locale= # set fixed locale, e.g. en_UK  
  54. spring.mvc.date-format= # set fixed date format, e.g. dd/MM/yyyy  
  55. spring.mvc.message-codes-resolver-format= # PREFIX_ERROR_CODE / POSTFIX_ERROR_CODE  
  56. spring.view.prefix= # MVC view prefix  
  57. spring.view.suffix= # ... and suffix  
  58. spring.resources.cache-period= # cache timeouts in headers sent to browser  
  59. spring.resources.add-mappings=true # if default mappings should be added  
  60.   
  61. # THYMELEAF (ThymeleafAutoConfiguration)  
  62. spring.thymeleaf.prefix=classpath:/templates/  
  63. spring.thymeleaf.suffix=.html  
  64. spring.thymeleaf.mode=HTML5  
  65. spring.thymeleaf.encoding=UTF-8  
  66. spring.thymeleaf.content-type=text/html # ;charset=<encoding> is added  
  67. spring.thymeleaf.cache=true # set to false for hot refresh  
  68.   
  69. # FREEMARKER (FreeMarkerAutoConfiguration)  
  70. spring.freemarker.allowRequestOverride=false  
  71. spring.freemarker.allowSessionOverride=false  
  72. spring.freemarker.cache=true  
  73. spring.freemarker.checkTemplateLocation=true  
  74. spring.freemarker.contentType=text/html  
  75. spring.freemarker.exposeRequestAttributes=false  
  76. spring.freemarker.exposeSessionAttributes=false  
  77. spring.freemarker.exposeSpringMacroHelpers=false  
  78. spring.freemarker.prefix=  
  79. spring.freemarker.requestContextAttribute=  
  80. spring.freemarker.settings.*=  
  81. spring.freemarker.suffix=.ftl  
  82. spring.freemarker.templateEncoding=UTF-8  
  83. spring.freemarker.templateLoaderPath=classpath:/templates/  
  84. spring.freemarker.viewNames= # whitelist of view names that can be resolved  
  85.   
  86. # GROOVY TEMPLATES (GroovyTemplateAutoConfiguration)  
  87. spring.groovy.template.allowRequestOverride=false  
  88. spring.groovy.template.allowSessionOverride=false  
  89. spring.groovy.template.cache=true  
  90. spring.groovy.template.configuration.*= # See Groovy's TemplateConfiguration  
  91. spring.groovy.template.contentType=text/html  
  92. spring.groovy.template.prefix=classpath:/templates/  
  93. spring.groovy.template.suffix=.tpl  
  94. spring.groovy.template.templateEncoding=UTF-8  
  95. spring.groovy.template.viewNames= # whitelist of view names that can be resolved  
  96.   
  97. # VELOCITY TEMPLATES (VelocityAutoConfiguration)  
  98. spring.velocity.allowRequestOverride=false  
  99. spring.velocity.allowSessionOverride=false  
  100. spring.velocity.cache=true  
  101. spring.velocity.checkTemplateLocation=true  
  102. spring.velocity.contentType=text/html  
  103. spring.velocity.dateToolAttribute=  
  104. spring.velocity.exposeRequestAttributes=false  
  105. spring.velocity.exposeSessionAttributes=false  
  106. spring.velocity.exposeSpringMacroHelpers=false  
  107. spring.velocity.numberToolAttribute=  
  108. spring.velocity.prefix=  
  109. spring.velocity.properties.*=  
  110. spring.velocity.requestContextAttribute=  
  111. spring.velocity.resourceLoaderPath=classpath:/templates/  
  112. spring.velocity.suffix=.vm  
  113. spring.velocity.templateEncoding=UTF-8  
  114. spring.velocity.viewNames= # whitelist of view names that can be resolved  
  115.   
  116. # INTERNATIONALIZATION (MessageSourceAutoConfiguration)  
  117. spring.messages.basename=messages  
  118. spring.messages.cacheSeconds=-1  
  119. spring.messages.encoding=UTF-8  
  120.   
  121.   
  122. # SECURITY (SecurityProperties)  
  123. security.user.name=user # login username  
  124. security.user.password= # login password  
  125. security.user.role=USER # role assigned to the user  
  126. security.require-ssl=false # advanced settings ...  
  127. security.enable-csrf=false  
  128. security.basic.enabled=true  
  129. security.basic.realm=Spring  
  130. security.basic.path= # /**  
  131. security.headers.xss=false  
  132. security.headers.cache=false  
  133. security.headers.frame=false  
  134. security.headers.contentType=false  
  135. security.headers.hsts=all # none / domain / all  
  136. security.sessions=stateless # always / never / if_required / stateless  
  137. security.ignored=false  
  138.   
  139. # DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)  
  140. spring.datasource.name= # name of the data source  
  141. spring.datasource.initialize=true # populate using data.sql  
  142. spring.datasource.schema= # a schema (DDL) script resource reference  
  143. spring.datasource.data= # a data (DML) script resource reference  
  144. spring.datasource.platform= # the platform to use in the schema resource (schema-${platform}.sql)  
  145. spring.datasource.continueOnError=false # continue even if can't be initialized  
  146. spring.datasource.separator=; # statement separator in SQL initialization scripts  
  147. spring.datasource.driverClassName= # JDBC Settings...  
  148. spring.datasource.url=  
  149. spring.datasource.username=  
  150. spring.datasource.password=  
  151. spring.datasource.max-active=100 # Advanced configuration...  
  152. spring.datasource.max-idle=8  
  153. spring.datasource.min-idle=8  
  154. spring.datasource.initial-size=10  
  155. spring.datasource.validation-query=  
  156. spring.datasource.test-on-borrow=false  
  157. spring.datasource.test-on-return=false  
  158. spring.datasource.test-while-idle=  
  159. spring.datasource.time-between-eviction-runs-millis=  
  160. spring.datasource.min-evictable-idle-time-millis=  
  161. spring.datasource.max-wait-millis=  
  162.   
  163. # MONGODB (MongoProperties)  
  164. spring.data.mongodb.host= # the db host  
  165. spring.data.mongodb.port=27017 # the connection port (defaults to 27107)  
  166. spring.data.mongodb.uri=mongodb://localhost/test # connection URL  
  167. spring.data.mongo.repositories.enabled=true # if spring data repository support is enabled  
  168.   
  169. # JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)  
  170. spring.jpa.properties.*= # properties to set on the JPA connection  
  171. spring.jpa.openInView=true  
  172. spring.jpa.show-sql=true  
  173. spring.jpa.database-platform=  
  174. spring.jpa.database=  
  175. spring.jpa.generate-ddl=false # ignored by Hibernate, might be useful for other vendors  
  176. spring.jpa.hibernate.naming-strategy= # naming classname  
  177. spring.jpa.hibernate.ddl-auto= # defaults to create-drop for embedded dbs  
  178. spring.data.jpa.repositories.enabled=true # if spring data repository support is enabled  
  179.   
  180. # SOLR (SolrProperties})  
  181. spring.data.solr.host=http://127.0.0.1:8983/solr  
  182. spring.data.solr.zkHost=  
  183. spring.data.solr.repositories.enabled=true # if spring data repository support is enabled  
  184.   
  185. # ELASTICSEARCH (ElasticsearchProperties})  
  186. spring.data.elasticsearch.cluster-name= # The cluster name (defaults to elasticsearch)  
  187. spring.data.elasticsearch.cluster-nodes= # The address(es) of the server node (comma-separated; if not specified starts a client node)  
  188. spring.data.elasticsearch.local=true # if local mode should be used with client nodes  
  189. spring.data.elasticsearch.repositories.enabled=true # if spring data repository support is enabled  
  190.   
  191.   
  192.   
  193. # FLYWAY (FlywayProperties)  
  194. flyway.locations=classpath:db/migrations # locations of migrations scripts  
  195. flyway.schemas= # schemas to update  
  196. flyway.initVersion= 1 # version to start migration  
  197. flyway.prefix=V  
  198. flyway.suffix=.sql  
  199. flyway.enabled=true  
  200. flyway.url= # JDBC url if you want Flyway to create its own DataSource  
  201. flyway.user= # JDBC username if you want Flyway to create its own DataSource  
  202. flyway.password= # JDBC password if you want Flyway to create its own DataSource  
  203.   
  204. # LIQUIBASE (LiquibaseProperties)  
  205. liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml  
  206. liquibase.contexts= # runtime contexts to use  
  207. liquibase.default-schema= # default database schema to use  
  208. liquibase.drop-first=false  
  209. liquibase.enabled=true  
  210.   
  211. # JMX  
  212. spring.jmx.enabled=true # Expose MBeans from Spring  
  213.   
  214. # RABBIT (RabbitProperties)  
  215. spring.rabbitmq.host= # connection host  
  216. spring.rabbitmq.port= # connection port  
  217. spring.rabbitmq.addresses= # connection addresses (e.g. myhost:9999,otherhost:1111)  
  218. spring.rabbitmq.username= # login user  
  219. spring.rabbitmq.password= # login password  
  220. spring.rabbitmq.virtualhost=  
  221. spring.rabbitmq.dynamic=  
  222.   
  223. # REDIS (RedisProperties)  
  224. spring.redis.host=localhost # server host  
  225. spring.redis.password= # server password  
  226. spring.redis.port=6379 # connection port  
  227. spring.redis.pool.max-idle=8 # pool settings ...  
  228. spring.redis.pool.min-idle=0  
  229. spring.redis.pool.max-active=8  
  230. spring.redis.pool.max-wait=-1  
  231.   
  232. # ACTIVEMQ (ActiveMQProperties)  
  233. spring.activemq.broker-url=tcp://localhost:61616 # connection URL  
  234. spring.activemq.user=  
  235. spring.activemq.password=  
  236. spring.activemq.in-memory=true # broker kind to create if no broker-url is specified  
  237. spring.activemq.pooled=false  
  238.   
  239. # HornetQ (HornetQProperties)  
  240. spring.hornetq.mode= # connection mode (native, embedded)  
  241. spring.hornetq.host=localhost # hornetQ host (native mode)  
  242. spring.hornetq.port=5445 # hornetQ port (native mode)  
  243. spring.hornetq.embedded.enabled=true # if the embedded server is enabled (needs hornetq-jms-server.jar)  
  244. spring.hornetq.embedded.serverId= # auto-generated id of the embedded server (integer)  
  245. spring.hornetq.embedded.persistent=false # message persistence  
  246. spring.hornetq.embedded.data-directory= # location of data content (when persistence is enabled)  
  247. spring.hornetq.embedded.queues= # comma separate queues to create on startup  
  248. spring.hornetq.embedded.topics= # comma separate topics to create on startup  
  249. spring.hornetq.embedded.cluster-password= # customer password (randomly generated by default)  
  250.   
  251. # JMS (JmsProperties)  
  252. spring.jms.pub-sub-domain= # false for queue (default), true for topic  
  253.   
  254. # SPRING BATCH (BatchDatabaseInitializer)  
  255. spring.batch.job.names=job1,job2  
  256. spring.batch.job.enabled=true  
  257. spring.batch.initializer.enabled=true  
  258. spring.batch.schema= # batch schema to load  
  259.   
  260. # AOP  
  261. spring.aop.auto=  
  262. spring.aop.proxy-target-class=  
  263.   
  264. # FILE ENCODING (FileEncodingApplicationListener)  
  265. spring.mandatory-file-encoding=false  
  266.   
  267. # SPRING SOCIAL (SocialWebAutoConfiguration)  
  268. spring.social.auto-connection-views=true # Set to true for default connection views or false if you provide your own  
  269.   
  270. # SPRING SOCIAL FACEBOOK (FacebookAutoConfiguration)  
  271. spring.social.facebook.app-id= # your application's Facebook App ID  
  272. spring.social.facebook.app-secret= # your application's Facebook App Secret  
  273.   
  274. # SPRING SOCIAL LINKEDIN (LinkedInAutoConfiguration)  
  275. spring.social.linkedin.app-id= # your application's LinkedIn App ID  
  276. spring.social.linkedin.app-secret= # your application's LinkedIn App Secret  
  277.   
  278. # SPRING SOCIAL TWITTER (TwitterAutoConfiguration)  
  279. spring.social.twitter.app-id= # your application's Twitter App ID  
  280. spring.social.twitter.app-secret= # your application's Twitter App Secret  
  281.   
  282. # SPRING MOBILE SITE PREFERENCE (SitePreferenceAutoConfiguration)  
  283. spring.mobile.sitepreference.enabled=true # enabled by default  
  284.   
  285. # SPRING MOBILE DEVICE VIEWS (DeviceDelegatingViewResolverAutoConfiguration)  
  286. spring.mobile.devicedelegatingviewresolver.enabled=true # disabled by default  
  287. spring.mobile.devicedelegatingviewresolver.normalPrefix=  
  288. spring.mobile.devicedelegatingviewresolver.normalSuffix=  
  289. spring.mobile.devicedelegatingviewresolver.mobilePrefix=mobile/  
  290. spring.mobile.devicedelegatingviewresolver.mobileSuffix=  
  291. spring.mobile.devicedelegatingviewresolver.tabletPrefix=tablet/  
  292. spring.mobile.devicedelegatingviewresolver.tabletSuffix=  
  293.   
  294. # ----------------------------------------  
  295. # ACTUATOR PROPERTIES  
  296. # ----------------------------------------  
  297.   
  298. # MANAGEMENT HTTP SERVER (ManagementServerProperties)  
  299. management.port= # defaults to 'server.port'  
  300. management.address= # bind to a specific NIC  
  301. management.contextPath= # default to '/'  
  302.   
  303. # ENDPOINTS (AbstractEndpoint subclasses)  
  304. endpoints.autoconfig.id=autoconfig  
  305. endpoints.autoconfig.sensitive=true  
  306. endpoints.autoconfig.enabled=true  
  307. endpoints.beans.id=beans  
  308. endpoints.beans.sensitive=true  
  309. endpoints.beans.enabled=true  
  310. endpoints.configprops.id=configprops  
  311. endpoints.configprops.sensitive=true  
  312. endpoints.configprops.enabled=true  
  313. endpoints.configprops.keys-to-sanitize=password,secret  
  314. endpoints.dump.id=dump  
  315. endpoints.dump.sensitive=true  
  316. endpoints.dump.enabled=true  
  317. endpoints.env.id=env  
  318. endpoints.env.sensitive=true  
  319. endpoints.env.enabled=true  
  320. endpoints.health.id=health  
  321. endpoints.health.sensitive=false  
  322. endpoints.health.enabled=true  
  323. endpoints.info.id=info  
  324. endpoints.info.sensitive=false  
  325. endpoints.info.enabled=true  
  326. endpoints.metrics.id=metrics  
  327. endpoints.metrics.sensitive=true  
  328. endpoints.metrics.enabled=true  
  329. endpoints.shutdown.id=shutdown  
  330. endpoints.shutdown.sensitive=true  
  331. endpoints.shutdown.enabled=false  
  332. endpoints.trace.id=trace  
  333. endpoints.trace.sensitive=true  
  334. endpoints.trace.enabled=true  
  335.   
  336. # MVC ONLY ENDPOINTS  
  337. endpoints.jolokia.path=jolokia  
  338. endpoints.jolokia.sensitive=true  
  339. endpoints.jolokia.enabled=true # when using Jolokia  
  340. endpoints.error.path=/error  
  341.   
  342. # JMX ENDPOINT (EndpointMBeanExportProperties)  
  343. endpoints.jmx.enabled=true  
  344. endpoints.jmx.domain= # the JMX domain, defaults to 'org.springboot'  
  345. endpoints.jmx.unique-names=false  
  346. endpoints.jmx.enabled=true  
  347. endpoints.jmx.staticNames=  
  348.   
  349. # JOLOKIA (JolokiaProperties)  
  350. jolokia.config.*= # See Jolokia manual  
  351.   
  352. # REMOTE SHELL  
  353. shell.auth=simple # jaas, key, simple, spring  
  354. shell.command-refresh-interval=-1  
  355. shell.command-path-pattern= # classpath*:/commands/**, classpath*:/crash/commands/**  
  356. shell.config-path-patterns= # classpath*:/crash/*  
  357. shell.disabled-plugins=false # don't expose plugins  
  358. shell.ssh.enabled= # ssh settings ...  
  359. shell.ssh.keyPath=  
  360. shell.ssh.port=  
  361. shell.telnet.enabled= # telnet settings ...  
  362. shell.telnet.port=  
  363. shell.auth.jaas.domain= # authentication settings ...  
  364. shell.auth.key.path=  
  365. shell.auth.simple.user.name=  
  366. shell.auth.simple.user.password=  
  367. shell.auth.spring.roles=  
  368.   
  369. # GIT INFO  
  370. spring.git.properties= # resource ref to generated git info properties file  
阅读全文
0 0
原创粉丝点击