Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save memory-lovers/4132241df38456642ad888634caee5c6 to your computer and use it in GitHub Desktop.
Save memory-lovers/4132241df38456642ad888634caee5c6 to your computer and use it in GitHub Desktop.
# ===================================================================
# APPLICATION PROPERTIES
# ===================================================================
# ----------------------------------------
# CORE PROPERTIES
# ----------------------------------------
# LOGGING
logging.file=logs/app.log
logging.level.root=WARN
logging.level.com.example=INFO
logging.level.org.hibernate.SQL=INFO
logging.level.org.hibernate.type.descriptor.sql.BasicBinder=INFO
# THYMELEAF (ThymeleafAutoConfiguration)
spring.thymeleaf.cache=false
# ----------------------------------------
# WEB PROPERTIES
# ----------------------------------------
# EMBEDDED SERVER CONFIGURATION (ServerProperties)
server.port=8080
server.session.timeout=900
# MULTIPART (MultipartProperties)
multipart.max-file-size=10MB
multipart.max-request-size=100MB
# JACKSON (JacksonProperties)
spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
# ----------------------------------------
# SECURITY PROPERTIES
# ----------------------------------------
# SECURITY (SecurityProperties)
security.basic.enabled=false
# ----------------------------------------
# DATA PROPERTIES
# ----------------------------------------
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
#spring.datasource.driverClassName=com.mysql.jdbc.Driver
#spring.datasource.url=jdbc:mysql://localhost/test
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:file:./database/test;MODE=PostgreSQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
spring.datasource.username=user
spring.datasource.password=user
### test and validation for connection
spring.datasource.test-on-borrow=true
spring.datasource.validation-query=SELECT 1
### remove connection when abolish
spring.datasource.remove-abandoned=true
spring.datasource.remove-abandoned-timeout=30
### Settings of Connection pool
spring.datasource.max-active=50
spring.datasource.max-idle=8
spring.datasource.min-idle=8
spring.datasource.initial-size=10
## Number of ms to wait before throwing an exception if no connection is available.
spring.datasource.max-wait=10000
# H2 Web Console (H2ConsoleProperties)
#spring.h2.console.enabled=false # Enable the console.
#spring.h2.console.path=/h2-console # Path at which the console will be available.
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
#spring.jpa.database-platform=org.hibernate.dialect.MySQLDialect
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=update
#spring.jpa.show-sql=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment