Skip to content

Commit b572b8b

Browse files
committed
Part 1 of Chapter 17
1 parent 78874c6 commit b572b8b

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ dependencies {
1919
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
2020
implementation 'org.springframework.boot:spring-boot-starter-validation'
2121
implementation 'org.springframework.boot:spring-boot-starter-web'
22+
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
23+
implementation 'mysql:mysql-connector-java:8.0.32'
2224
developmentOnly 'org.springframework.boot:spring-boot-devtools'
2325
testImplementation 'org.springframework.boot:spring-boot-starter-test'
2426
}

src/main/java/org/launchcode/codingevents/models/Event.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
/**
1010
* Created by Chris Bay
1111
*/
12+
1213
public class Event {
1314

1415
private int id;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,17 @@
1+
# Database connection settings
2+
spring.datasource.url=jdbc:mysql://localhost:3306/coding-events
3+
spring.datasource.username=coding_events
4+
spring.datasource.password=Learn2code!
15

6+
# Specify the DBMS
7+
spring.jpa.database = MYSQL
8+
9+
# Show or not log for each sql query
10+
spring.jpa.show-sql = false
11+
12+
# Hibernate ddl auto (create, create-drop, update)
13+
spring.jpa.hibernate.ddl-auto = update
14+
15+
# Use spring.jpa.properties.* for Hibernate native properties (the prefix is
16+
# stripped before adding them to the entity manager)
17+
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL8Dialect

0 commit comments

Comments
 (0)