Spring Boot - MySQL
- Add MySQL dependency
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
- Add the properties in application.properties
spring.jpa.hibernate.ddl-auto=none
spring.datasource.url=jdbc:mysql://localhost:3306/baseband
spring.datasource.username=root
spring.datasource.password=admin
Spring Boot - SQL Server
- Add dependency
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>6.1.0.jre8</version>
</dependency>
- Properties
spring.datasource.url=jdbc:sqlserver://146.250.116.35:1433;databaseName=ServiceRecruitment
spring.datasource.username=sa
spring.datasource.password=N@viembre2514
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.show-sql=true
spring.jpa.hibernate.dialect=org.hibernate.dialect.SQLServer2012Dialect
spring.jpa.hibernate.ddl-auto = none
FAQ
- How to create fields using reserved words
@Column(name="`condition`")
Comentarios
Publicar un comentario