Last active
April 3, 2024 15:48
-
-
Save seycileli/b394f9c735bde28ab6799702122c32cd to your computer and use it in GitHub Desktop.
Spring Boot – DataSource Configuration / application.properties example
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
<!-- MAKE SURE TO ADD DATABASE DEPENDENCY IN POM.XML --> | |
# H2 | |
spring.datasource.url=jdbc:h2:file:C:/temp/test | |
spring.datasource.username=sa | |
spring.datasource.password= | |
spring.datasource.driverClassName=org.h2.Driver | |
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect | |
# MySQL | |
#spring.datasource.url=jdbc:mysql://localhost:3306/test | |
#spring.datasource.username=dbuser | |
#spring.datasource.password=dbpass | |
#spring.datasource.driver-class-name=com.mysql.jdbc.Driver | |
spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect | |
# Oracle | |
#spring.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl | |
#spring.datasource.username=dbuser | |
#spring.datasource.password=dbpass | |
#spring.datasource.driver-class-name=oracle.jdbc.OracleDriver | |
#spring.jpa.database-platform=org.hibernate.dialect.Oracle10gDialect | |
# SQL Server | |
#spring.datasource.url=jdbc:sqlserver://localhost;databaseName=springbootdb | |
#spring.datasource.username=dbuser | |
#spring.datasource.password=dbpass | |
#spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver | |
#spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment