Spring Boot Application Properties configuration detailed

Source: Internet
Author: User
Tags locale solr rabbitmq

######## #COMMON SPRING BOOT PROPERTIES


######========core properties===========

#SPRING CONFIG (Configfileapplicationlistener)


Spring.config.name= # config file name (default to ' application ')
spring.config.location= # location of config file

#PROFILES
spring.profiles= # comma List of active profiles


#APPLICATION SETTINGS (springapplication)
spring.main.sources=
Spring.main.web-environment= # Detect by default
Spring.main.show-banner=true
Spring.main....= # See class for all properties


#LOGGING
Logging.path=/var/logs
Logging.file=myapp.log
logging.config=


#IDENTITY (Contextidapplicationcontextinitializer)
Spring.application.name=
spring.application.index=


#EMBEDDED SERVER CONFIGURATION (serverproperties)
server.port=8080
Server.address= # bind to a specific NIC
Server.session-timeout= # Session Timeout in seconds
Server.context-path= # The context path, defaults to '/'
Server.servlet-path= # The servlet path, defaults to '/'
server.tomcat.access-log-pattern= # Log pattern of the access log
Server.tomcat.access-log-enabled=false # is Access logging enabled
Server.tomcat.protocol-header=x-forwarded-proto # SSL Forward headers
Server.tomcat.remote-ip-header=x-forwarded-for
Server.tomcat.basedir=/tmp # base Dir (usually not needed, defaults to TMP)
server.tomcat.background-processor-delay=30; # in seconds
server.tomcat.max-threads = 0 # of threads in protocol handler
server.tomcat.uri-encoding = UTF-8 # character encoding to use for URL decoding


#SPRING MVC (httpmapperproperties)
Http.mappers.json-pretty-print=false # Pretty Print JSON
Http.mappers.json-sort-keys=false # Sort Keys
spring.mvc.locale= # Set fixed locale, e.g. Enuk
spring.mvc.date-format= # Set fixed date format, e.g. dd/mm/yyyy
spring.mvc.message-codes-resolver-format= # Prefixerrorcode/postfixerror_code
spring.view.prefix= # MVC View Prefix
spring.view.suffix= # ... and suffix
Spring.resources.cache-period= # Cache Timeouts in headers sent to browser
Spring.resources.add-mappings=true # If default mappings should be added

spring.jackson.timezone=gmt+08:00
SPRING.JACKSON.DATE-FORMAT=YYYY-MM-DD HH:mm:ss
SPRING.MVC.DATE-FORMAT=YYYY-MM-DD HH:mm:ss




#THYMELEAF (thymeleafautoconfiguration)
spring.thymeleaf.prefix=classpath:/templates/
Spring.thymeleaf.suffix=.html
Spring.thymeleaf.mode=html5
Spring.thymeleaf.encoding=utf-8
Spring.thymeleaf.content-type=text/html #;charset=<encoding> is added
Spring.thymeleaf.cache=true # set to False for hot refresh


#FREEMARKER (freemarkerautoconfiguration)
Spring.freemarker.allowrequestoverride=false
Spring.freemarker.allowsessionoverride=false
Spring.freemarker.cache=true
Spring.freemarker.checktemplatelocation=true
Spring.freemarker.contenttype=text/html
Spring.freemarker.exposerequestattributes=false
Spring.freemarker.exposesessionattributes=false
Spring.freemarker.exposespringmacrohelpers=false
spring.freemarker.prefix=
Spring.freemarker.requestcontextattribute=
spring.freemarker.settings.*=
Spring.freemarker.suffix=.ftl
Spring.freemarker.templateencoding=utf-8
spring.freemarker.templateloaderpath=classpath:/templates/
Spring.freemarker.viewnames= # Whitelist of view names so can be resolved


#GROOVY TEMPLATES (groovytemplateautoconfiguration)
Spring.groovy.template.allowrequestoverride=false
Spring.groovy.template.allowsessionoverride=false
Spring.groovy.template.cache=true
spring.groovy.template.configuration.*= # See Groovy ' s templateconfiguration
Spring.groovy.template.contenttype=text/html
spring.groovy.template.prefix=classpath:/templates/
Spring.groovy.template.suffix=.tpl
Spring.groovy.template.templateencoding=utf-8
Spring.groovy.template.viewnames= # Whitelist of view names so can be resolved


#VELOCITY TEMPLATES (velocityautoconfiguration)
Spring.velocity.allowrequestoverride=false
Spring.velocity.allowsessionoverride=false
Spring.velocity.cache=true
Spring.velocity.checktemplatelocation=true
Spring.velocity.contenttype=text/html
Spring.velocity.datetoolattribute=
Spring.velocity.exposerequestattributes=false
Spring.velocity.exposesessionattributes=false
Spring.velocity.exposespringmacrohelpers=false
Spring.velocity.numbertoolattribute=
spring.velocity.prefix=
spring.velocity.properties.*=
Spring.velocity.requestcontextattribute=
spring.velocity.resourceloaderpath=classpath:/templates/
Spring.velocity.suffix=.vm
Spring.velocity.templateencoding=utf-8
Spring.velocity.viewnames= # Whitelist of view names so can be resolved


#INTERNATIONALIZATION (messagesourceautoconfiguration)
Spring.messages.basename=messages
Spring.messages.cacheseconds=-1
Spring.messages.encoding=utf-8


#SECURITY (securityproperties)
Security.user.name=user # Login Username
security.user.password= # Login Password
Security.user.role=user # Role assigned to the user
Security.require-ssl=false # Advanced Settings ...
Security.enable-csrf=false
Security.basic.enabled=true
Security.basic.realm=spring
Security.basic.path= #/**
Security.headers.xss=false
Security.headers.cache=false
Security.headers.frame=false
Security.headers.contenttype=false
Security.headers.hsts=all # None/domain/all
Security.sessions=stateless # always/never/if_required/stateless
Security.ignored=false


#DATASOURCE (Datasourceautoconfiguration & Datasourceproperties)
Spring.datasource.name= # Name of the data source
Spring.datasource.initialize=true # populate using Data.sql
Spring.datasource.schema= # A schema (DDL) script resource Reference
Spring.datasource.data= # A data (DML) script resource Reference
Spring.datasource.platform= # The platform to use in the schema resource (schema-${platform}.sql)
Spring.datasource.continueonerror=false # Continue even if can ' t be initialized
spring.datasource.separator=; # statement Separator in SQL initialization scripts
Spring.datasource.driverclassname= # JDBC Settings ...
Spring.datasource.url=
Spring.datasource.username=
spring.datasource.password=
SPRING.DATASOURCE.MAX-ACTIVE=100 # Advanced Configuration ...
Spring.datasource.max-idle=8
Spring.datasource.min-idle=8
spring.datasource.initial-size=10
spring.datasource.validation-query=
Spring.datasource.test-on-borrow=false
Spring.datasource.test-on-return=false
spring.datasource.test-while-idle=
spring.datasource.time-between-eviction-runs-millis=
spring.datasource.min-evictable-idle-time-millis=
spring.datasource.max-wait-millis=


#MONGODB (mongoproperties)
Spring.data.mongodb.host= # The DB host
SPRING.DATA.MONGODB.PORT=27017 # The connection port (defaults to 27107)
Spring.data.mongodb.uri=mongodb://localhost/test # Connection URL
Spring.data.mongo.repositories.enabled=true # If spring data repository support is enabled


#JPA (Jpabaseconfiguration, hibernatejpaautoconfiguration)
Spring.jpa.properties.*= # Properties to set on the JPA connection
Spring.jpa.openinview=true
Spring.jpa.show-sql=true
spring.jpa.database-platform=
Spring.jpa.database=
Spring.jpa.generate-ddl=false # Ignored by Hibernate, might is useful for other vendors
spring.jpa.hibernate.naming-strategy= # naming classname
spring.jpa.hibernate.ddl-auto= # defaults to Create-drop for embedded DBS
Spring.data.jpa.repositories.enabled=true # If spring data repository support is enabled


#SOLR (Solrproperties})
Spring.data.solr.host=http://127.0.0.1:8983/solr
spring.data.solr.zkhost=
Spring.data.solr.repositories.enabled=true # If spring data repository support is enabled


#ELASTICSEARCH (Elasticsearchproperties})
Spring.data.elasticsearch.cluster-name= # The cluster name (defaults to Elasticsearch)
spring.data.elasticsearch.cluster-nodes= # The address (es) of the server node (comma-separated; If not specified starts a Client node)
Spring.data.elasticsearch.local=true # If local mode should is used with client nodes
Spring.data.elasticsearch.repositories.enabled=true # If spring data repository support is enabled


#FLYWAY (flywayproperties)
Flyway.locations=classpath:db/migrations # Locations of migrations scripts
flyway.schemas= # schemas to update
Flyway.initversion= 1 # version to start migration
Flyway.prefix=v
Flyway.suffix=.sql
Flyway.enabled=true
Flyway.url= # JDBC URL If you want Flyway to create its own DataSource
Flyway.user= # JDBC Username if you want Flyway to create its own DataSource
flyway.password= # JDBC Password if you want Flyway to create its own DataSource


#LIQUIBASE (liquibaseproperties)
Liquibase.change-log=classpath:/db/changelog/db.changelog-master.yaml
liquibase.contexts= # Runtime contexts to use
Liquibase.default-schema= # Default database schema to use
Liquibase.drop-first=false
Liquibase.enabled=true


#JMX
Spring.jmx.enabled=true # Expose MBeans from Spring


#ABBIT (rabbitproperties)
Spring.rabbitmq.host= # Connection Host
spring.rabbitmq.port= # Connection Port
spring.rabbitmq.addresses= # connection addresses (e.g. myhost:9999,otherhost:1111)
Spring.rabbitmq.username= # Login User
spring.rabbitmq.password= # Login Password
spring.rabbitmq.virtualhost=
Spring.rabbitmq.dynamic=


#REDIS (redisproperties)
Spring.redis.host=localhost # Server Host
spring.redis.password= # server Password
spring.redis.port=6379 # Connection Port
Spring.redis.pool.max-idle=8 # Pool Settings ...
Spring.redis.pool.min-idle=0
Spring.redis.pool.max-active=8
Spring.redis.pool.max-wait=-1


#ACTIVEMQ (activemqproperties)
spring.activemq.broker-url=tcp://localhost:61616 # Connection URL
Spring.activemq.user=
spring.activemq.password=
Spring.activemq.in-memory=true # Broker Kind to the create if no broker-url is specified
Spring.activemq.pooled=false


#HornetQ (hornetqproperties)
Spring.hornetq.mode= # Connection mode (native, embedded)
Spring.hornetq.host=localhost # HORNETQ Host (native mode)
spring.hornetq.port=5445 # HORNETQ port (native mode)
Spring.hornetq.embedded.enabled=true # If the embedded server is enabled (needs Hornetq-jms-server.jar)
Spring.hornetq.embedded.serverid= # auto-generated ID of the embedded server (integer)
Spring.hornetq.embedded.persistent=false # message Persistence
spring.hornetq.embedded.data-directory= # Location of the data content (when persistence is enabled)
spring.hornetq.embedded.queues= # comma separate queues to create on startup
spring.hornetq.embedded.topics= # comma separate topics to create on startup
spring.hornetq.embedded.cluster-password= # customer password (randomly generated by default)


#JMS (jmsproperties)
Spring.jms.pub-sub-domain= # False for the queue (default), True for topic


#SPRING BATCH (Batchdatabaseinitializer)
Spring.batch.job.names=job1,job2
Spring.batch.job.enabled=true
Spring.batch.initializer.enabled=true
Spring.batch.schema= # Batch schema to load


#AOP
spring.aop.auto=
spring.aop.proxy-target-class=


#FILE ENCODING (Fileencodingapplicationlistener)
Spring.mandatory-file-encoding=false


#SPRING Social (socialwebautoconfiguration)
Spring.social.auto-connection-views=true # Set to True for default connection views or False if you provide your own


#SPRING Social FACEBOOK (facebookautoconfiguration)
Spring.social.facebook.app-id= # Your application ' s Facebook App ID
spring.social.facebook.app-secret= # Your application ' s Facebook app secret


#SPRING Social LINKEDIN (linkedinautoconfiguration)
Spring.social.linkedin.app-id= # Your application ' s LinkedIn app ID
spring.social.linkedin.app-secret= # Your application ' s LinkedIn app secret


#SPRING Social TWITTER (twitterautoconfiguration)
Spring.social.twitter.app-id= # Your application ' s Twitter app ID
spring.social.twitter.app-secret= # Your application ' s Twitter app secret


#SPRING MOBILE SITE PREFERENCE (sitepreferenceautoconfiguration)
Spring.mobile.sitepreference.enabled=true # Enabled by default


#SPRING MOBILE DEVICE Views (devicedelegatingviewresolverautoconfiguration)
Spring.mobile.devicedelegatingviewresolver.enabled=true # Disabled by default
spring.mobile.devicedelegatingviewresolver.normalprefix=
spring.mobile.devicedelegatingviewresolver.normalsuffix=
spring.mobile.devicedelegatingviewresolver.mobileprefix=mobile/
spring.mobile.devicedelegatingviewresolver.mobilesuffix=
spring.mobile.devicedelegatingviewresolver.tabletprefix=tablet/
spring.mobile.devicedelegatingviewresolver.tabletsuffix=





######========actuator properties===========

#MANAGEMENT HTTP SERVER (managementserverproperties)
management.port= # defaults to ' Server.port '
Management.address= # bind to a specific NIC
Management.contextpath= # Default to '/'


#ENDPOINTS (Abstractendpoint subclasses)
Endpoints.autoconfig.id=autoconfig
Endpoints.autoconfig.sensitive=true
Endpoints.autoconfig.enabled=true
Endpoints.beans.id=beans
Endpoints.beans.sensitive=true
Endpoints.beans.enabled=true
Endpoints.configprops.id=configprops
Endpoints.configprops.sensitive=true
Endpoints.configprops.enabled=true
Endpoints.configprops.keys-to-sanitize=password,secret
Endpoints.dump.id=dump
Endpoints.dump.sensitive=true
Endpoints.dump.enabled=true
Endpoints.env.id=env
Endpoints.env.sensitive=true
Endpoints.env.enabled=true
Endpoints.health.id=health
Endpoints.health.sensitive=false
Endpoints.health.enabled=true
Endpoints.info.id=info
Endpoints.info.sensitive=false
Endpoints.info.enabled=true
Endpoints.metrics.id=metrics
Endpoints.metrics.sensitive=true
Endpoints.metrics.enabled=true
Endpoints.shutdown.id=shutdown
Endpoints.shutdown.sensitive=true
Endpoints.shutdown.enabled=false
Endpoints.trace.id=trace
Endpoints.trace.sensitive=true
Endpoints.trace.enabled=true


#MVC only Endpoints
Endpoints.jolokia.path=jolokia
Endpoints.jolokia.sensitive=true
Endpoints.jolokia.enabled=true # when using Jolokia
Endpoints.error.path=/error


#JMX ENDPOINT (endpointmbeanexportproperties)
Endpoints.jmx.enabled=true
endpoints.jmx.domain= # The JMX domain, defaults to ' Org.springboot '
Endpoints.jmx.unique-names=false
Endpoints.jmx.enabled=true
endpoints.jmx.staticnames=


#JOLOKIA (jolokiaproperties)
jolokia.config.*= # See Jolokia manual


#REMOTE SHELL
Shell.auth=simple # Jaas, key, simple, spring
Shell.command-refresh-interval=-1
shell.command-path-pattern= # classpath:/commands/, classpath:/crash/commands/
shell.config-path-patterns= # classpath:/crash/
Shell.disabled-plugins=false # don ' t expose plugins
shell.ssh.enabled= # SSH Settings ...
Shell.ssh.keypath=
shell.ssh.port=
shell.telnet.enabled= # telnet Settings ...
shell.telnet.port=
Shell.auth.jaas.domain= # Authentication Settings ...
Shell.auth.key.path=
Shell.auth.simple.user.name=
shell.auth.simple.user.password=
shell.auth.spring.roles=


#GIT INFO
Spring.git.properties= # Resource ref to generated git info properties file

Spring Boot Application Properties configuration detailed

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.