diff --git a/build.gradle b/build.gradle new file mode 100644 index 00000000..a28e68b9 --- /dev/null +++ b/build.gradle @@ -0,0 +1,48 @@ +plugins { + id 'org.springframework.boot' version '2.4.1' + id 'io.spring.dependency-management' version '1.0.10.RELEASE' + id 'org.asciidoctor.convert' version '1.5.8' + id 'java' +} + +group = 'com.flab.soft' +version = '0.0.1-SNAPSHOT' +sourceCompatibility = '11' + +configurations { + compileOnly { + extendsFrom annotationProcessor + } +} + +repositories { + mavenCentral() +} + +ext { + set('snippetsDir', file("build/generated-snippets")) +} + +dependencies { + implementation 'org.springframework.boot:spring-boot-starter-data-jpa' + implementation 'org.springframework.boot:spring-boot-starter-web' + compileOnly 'org.projectlombok:lombok' + developmentOnly 'org.springframework.boot:spring-boot-devtools' + runtimeOnly 'com.h2database:h2' + annotationProcessor 'org.projectlombok:lombok' + testImplementation 'org.springframework.boot:spring-boot-starter-test' + testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc' + + // springboot 2.3 버전부터 Valid 가 Web-starter 에서 제외됨으로 추가 + implementation 'org.springframework.boot:spring-boot-starter-validation' +} + +test { + outputs.dir snippetsDir + useJUnitPlatform() +} + +asciidoctor { + inputs.dir snippetsDir + dependsOn test +} diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 00000000..3cda7021 --- /dev/null +++ b/settings.gradle @@ -0,0 +1 @@ +rootProject.name = 'shoeauction' diff --git a/src/main/java/com/flab/soft/shoeauction/Application.java b/src/main/java/com/flab/soft/shoeauction/Application.java new file mode 100644 index 00000000..b5976f83 --- /dev/null +++ b/src/main/java/com/flab/soft/shoeauction/Application.java @@ -0,0 +1,12 @@ +package com.flab.soft.shoeauction; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class Application { + + public static void main(String[] args) { + SpringApplication.run(Application.class, args); + } +} \ No newline at end of file diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml new file mode 100644 index 00000000..a9b40fb9 --- /dev/null +++ b/src/main/resources/application.yml @@ -0,0 +1,6 @@ +spring: + datasource: + url: jdbc:h2:tcp://localhost/~/shoeactions + username: sa + password: + driver-class-name: org.h2.Driver \ No newline at end of file diff --git a/src/test/java/com/flab/soft/shoeauction/ApplicationTests.java b/src/test/java/com/flab/soft/shoeauction/ApplicationTests.java new file mode 100644 index 00000000..478f3eb6 --- /dev/null +++ b/src/test/java/com/flab/soft/shoeauction/ApplicationTests.java @@ -0,0 +1,13 @@ +package com.flab.soft.shoeauction; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class ApplicationTests { + + @Test + void contextLoads() { + } + +}