패키지 구조 수정 및 추가
This commit is contained in:
34
api-app/app/build.gradle
Normal file
34
api-app/app/build.gradle
Normal file
@@ -0,0 +1,34 @@
|
||||
plugins {
|
||||
id 'org.springframework.boot'
|
||||
id 'io.spring.dependency-management'
|
||||
id 'java'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// postgres
|
||||
implementation project(':infrastructure-db-postgres')
|
||||
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
|
||||
|
||||
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.5.0'
|
||||
implementation "com.querydsl:querydsl-jpa:5.0.0:jakarta"
|
||||
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
annotationProcessor "com.querydsl:querydsl-apt:5.0.0:jakarta"
|
||||
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
|
||||
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
}
|
||||
|
||||
tasks.named('test') {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
bootJar {
|
||||
archiveFileName = 'ROOT.jar'
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.cd.detection;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class DabeeoDetectionApiApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(DabeeoDetectionApiApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cd.detection.config;
|
||||
|
||||
import com.querydsl.jpa.impl.JPAQueryFactory;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.PersistenceContext;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class QuerydslConfig {
|
||||
|
||||
@PersistenceContext
|
||||
private EntityManager entityManager;
|
||||
|
||||
@Bean
|
||||
public JPAQueryFactory jpaQueryFactory() {
|
||||
return new JPAQueryFactory(entityManager);
|
||||
}
|
||||
}
|
||||
5
api-app/app/src/main/resources/application-dev.yml
Normal file
5
api-app/app/src/main/resources/application-dev.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://localhost:5432/dabeeo_detection_dev
|
||||
username: dabeeo_detection
|
||||
password: 1234
|
||||
5
api-app/app/src/main/resources/application-prod.yml
Normal file
5
api-app/app/src/main/resources/application-prod.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
spring:
|
||||
datasource:
|
||||
url: jdbc:postgresql://localhost:5432/dabeeo_detection_dev
|
||||
username: dabeeo_detection
|
||||
password: 1234
|
||||
11
api-app/app/src/main/resources/application.yml
Normal file
11
api-app/app/src/main/resources/application.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
spring:
|
||||
profiles:
|
||||
active: local
|
||||
|
||||
jpa:
|
||||
hibernate:
|
||||
ddl-auto: update
|
||||
show-sql: true
|
||||
properties:
|
||||
hibernate:
|
||||
format_sql: true
|
||||
Reference in New Issue
Block a user