Wednesday, November 13, 2019

Common Application properties



1. Core Properties

debug=false Enable debug logs
logging.file.name=myapp.log Log file name (for instance, `myapp.log`). Names can be an exact location or relative to the current directory.
logging.level.* =DEBUG Log levels severity mapping. For instance, `logging.level.org.springframework=DEBUG`.

spring.aop.auto= true Add @EnableAspectJAutoProxy.
spring.application.name=xyz Application name.
spring.autoconfigure.exclude=* Auto-configuration classes to exclude.
spring.config.name=application Config file name.
spring.main.lazy-initialization=false Whether initialization should be performed lazily.
spring.main.web-application-type    Flag to explicitly request a specific type of web application. If not set, auto-detected based on the classpath. Ex : None
spring.profiles.active Comma-separated list of active profiles. Can be overridden by a command line switch.
trace=false Enable trace logs.

2. Cache properties

spring.cache.ehcache.config The location of the configuration file to use to initialize EhCache.

3. Data Properties

spring.datasource.driver-class-name Fully qualified name of the JDBC driver. Auto-detected based on the URL by default.
spring.datasource.name Name of the datasource. Default to "testdb" when using an embedded database.
spring.datasource.password Login password of the database.
spring.datasource.url JDBC URL of the database.
spring.datasource.username Login username of the database.
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.show-sql=false Whether to enable logging of SQL statements.


4. Web properties

spring.http.encoding.charset=UTF-8 Charset of HTTP requests and responses. Added to the "Content-Type" header if not set explicitly.
spring.mvc.view.prefix Spring MVC view prefix.
spring.mvc.view.suffix Spring MVC view suffix.
spring.servlet.multipart.enabled=true Whether to enable support of multipart uploads.


5.Server properties

server.address Network address to which the server should bind.
server.compression.enabled=false Whether response compression is enabled.
server.error.path=/error Path of the error controller.
server.http2.enabled=false Whether to enable HTTP/2 support, if the current environment supports it.
server.max-http-header-size=8KB Maximum size of the HTTP message header.
server.port=8080 Server HTTP port.
server.servlet.application-display-name=application Display name of the application.
server.servlet.session.timeout=30m Session timeout. If a duration suffix is not specified, seconds will be used.
server.ssl.enabled=true Whether to enable SSL support.
server.tomcat.max-connections=10000 Maximum number of connections that the server accepts and processes at any given time. Once the limit has been reached, the operating system may still accept connections based on the "acceptCount" property.

6. Security properties

spring.security.user.name=user Default user name.
spring.security.user.password Password for the default user name.
spring.security.user.roles Granted roles for the default user name.
spring.session.timeout Session timeout. If a duration suffix is not specified, seconds will be used.

7. Actuator

management.endpoint.health.enabled=true Whether to enable the health endpoint.







Ref: https://docs.spring.io/spring-boot/docs/current/reference/html/appendix-application-properties.html#core-properties

No comments:

Post a Comment