From 7e600f9e627666bccd0687ea07cc37a2bf2900d4 Mon Sep 17 00:00:00 2001 From: taeyeongKims Date: Sun, 26 Jan 2025 10:27:09 +0900 Subject: [PATCH] docker use --- build.gradle | 2 +- .../example/api/account/entity/QLocation.java | 8 +++++++ .../com/example/api/domain/QReviewReport.java | 8 +++++++ src/main/resources/application.properties | 24 ++++++++----------- 4 files changed, 27 insertions(+), 15 deletions(-) diff --git a/build.gradle b/build.gradle index b37f56a2..86c85ec9 100644 --- a/build.gradle +++ b/build.gradle @@ -28,7 +28,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.projectlombok:lombok' -// runtimeOnly 'com.mysql:mysql-connector-j' + runtimeOnly 'com.mysql:mysql-connector-j' runtimeOnly 'com.h2database:h2' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/src/main/generated/com/example/api/account/entity/QLocation.java b/src/main/generated/com/example/api/account/entity/QLocation.java index c15f6d8b..fde2527b 100644 --- a/src/main/generated/com/example/api/account/entity/QLocation.java +++ b/src/main/generated/com/example/api/account/entity/QLocation.java @@ -19,12 +19,20 @@ public class QLocation extends EntityPathBase { public static final QLocation location = new QLocation("location"); + public final com.example.api.domain.QBaseEntity _super = new com.example.api.domain.QBaseEntity(this); + public final StringPath address = createString("address"); + //inherited + public final DateTimePath createdDate = _super.createdDate; + public final StringPath detailAddress = createString("detailAddress"); public final NumberPath id = createNumber("id", Long.class); + //inherited + public final DateTimePath updatedDate = _super.updatedDate; + public final StringPath zipcode = createString("zipcode"); public QLocation(String variable) { diff --git a/src/main/generated/com/example/api/domain/QReviewReport.java b/src/main/generated/com/example/api/domain/QReviewReport.java index 68d48ced..2cafb825 100644 --- a/src/main/generated/com/example/api/domain/QReviewReport.java +++ b/src/main/generated/com/example/api/domain/QReviewReport.java @@ -22,12 +22,20 @@ public class QReviewReport extends EntityPathBase { public static final QReviewReport reviewReport = new QReviewReport("reviewReport"); + public final QBaseEntity _super = new QBaseEntity(this); + + //inherited + public final DateTimePath createdDate = _super.createdDate; + public final StringPath reason = createString("reason"); public final NumberPath reportId = createNumber("reportId", Long.class); public final QReview review; + //inherited + public final DateTimePath updatedDate = _super.updatedDate; + public QReviewReport(String variable) { this(ReviewReport.class, forVariable(variable), INITS); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 832f5a20..3fb87397 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,21 +2,20 @@ spring.application.name=api spring.config.import=optional:file:.env[.properties] -# H2 Database Configuration (In-Memory) -spring.datasource.url=jdbc:h2:mem:testdb -spring.datasource.driver-class-name=org.h2.Driver -spring.datasource.username=sa -spring.datasource.password= +# mysql Database Configuration +spring.datasource.url=jdbc:mysql://52.79.243.139:3306/danpat?useSSL=false&serverTimezone=Asia/Seoul&characterEncoding=UTF-8 +spring.datasource.username=root +spring.datasource.password=password +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver + +# Mongo Database Configuration +spring.data.mongodb.auto-index-creation=true # JPA and Hibernate Configuration -spring.jpa.hibernate.ddl-auto=create +spring.jpa.hibernate.ddl-auto=validate spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true -spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect - -# H2 Console Configuration -spring.h2.console.enabled=true -spring.h2.console.path=/h2-console +spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect # Logging (Optional) logging.level.org.hibernate.SQL=DEBUG @@ -26,9 +25,6 @@ logging.level.root=INFO logging.pattern.console=%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n logging.pattern.file=%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{36} - %msg%n -# Mongo Database Configuration -spring.data.mongodb.auto-index-creation=true - # SMTP spring.mail.host=smtp.gmail.com spring.mail.port=587