Last active
June 11, 2024 21:34
-
-
Save bijay-shrestha/b0e019d5c60668c8c1a773ae3b880de7 to your computer and use it in GitHub Desktop.
application.properties for Spring boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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:mysql://localhost:3306/test | |
#spring.datasource.username=user | |
#spring.datasource.password=user | |
#spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect | |
#spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect | |
### MySQL Datasource Properties | |
spring.datasource.driverClassName=com.mysql.jdbc.Driver | |
spring.datasource.url=jdbc:mysql://localhost:3306/x | |
spring.datasource.username=root | |
spring.datasource.password=pa$$w0rd | |
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect | |
spring.jpa.hibernate.ddl-auto=update | |
### 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