Instantly share code, notes, and snippets.

Embed
What would you like to do?
[Spring Boot] Provide MySql database
spring.datasource.url=jdbc:mysql://localhost:3306/aarlensdb?useSSL=false&characterEncoding=utf8
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.username=my-username
spring.datasource.password=password
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
spring:
datasource:
url: jdbc:mysql://localhost:3306/aarlensdb?useSSL=false&characterEncoding=utf8
driver-class-name: com.mysql.jdbc.Driver
username: my-username
password: password
jpa:
hibernate:
naming-strategy: org.hibernate.cfg.ImprovedNamingStrategy
dialect: org.hibernate.dialect.MySQL5Dialect
<project>
...
<dependencies>
...
<!-- Activada la capa JPA -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Elegimos nuestra BD -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
...
</dependencies>
...
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment