diff --git a/build.gradle b/build.gradle index 5d7484ceb..b9473b3bd 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version '2.7.10-SNAPSHOT' + id 'org.springframework.boot' version '2.7.9' id 'io.spring.dependency-management' version '1.0.15.RELEASE' } @@ -8,12 +8,10 @@ sourceCompatibility = '11' repositories { mavenCentral() - maven { url 'https://repo.spring.io/milestone' } - maven { url 'https://repo.spring.io/snapshot' } } dependencies { - implementation 'org.springframework.boot:spring-boot-starter' + implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' } diff --git a/src/main/java/racingcar/RacingcarApplication.java b/src/main/java/racingcar/RacingCarApplication.java similarity index 69% rename from src/main/java/racingcar/RacingcarApplication.java rename to src/main/java/racingcar/RacingCarApplication.java index 64ee64494..3ebfe54c3 100644 --- a/src/main/java/racingcar/RacingcarApplication.java +++ b/src/main/java/racingcar/RacingCarApplication.java @@ -4,10 +4,10 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication -public class RacingcarApplication { +public class RacingCarApplication { public static void main(String[] args) { - SpringApplication.run(RacingcarApplication.class, args); + SpringApplication.run(RacingCarApplication.class, args); } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8b1378917..e69de29bb 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1 +0,0 @@ - diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql new file mode 100644 index 000000000..56f06adfd --- /dev/null +++ b/src/main/resources/data.sql @@ -0,0 +1,7 @@ +-- TODO: 기능 구현에 필요한 내용을 추가하거나 수정하세요. +CREATE TABLE PLAY_RESULT ( + id INT NOT NULL AUTO_INCREMENT, + winners VARCHAR(50) NOT NULL, + created_at DATETIME NOT NULL default current_timestamp, + PRIMARY KEY (id) +); diff --git a/src/main/resources/static/css/styles.css b/src/main/resources/static/css/styles.css new file mode 100644 index 000000000..6c9652ce0 --- /dev/null +++ b/src/main/resources/static/css/styles.css @@ -0,0 +1,120 @@ +body { + font-family: Arial, sans-serif; + background-color: #f2f2f2; +} +h1 { + margin: 20px 0; + font-size: 24px; + text-align: center; +} +/* 입력 영역 */ +.input-area { + display: flex; + flex-direction: column; + align-items: center; + margin: 50px 0; +} + +.input-area label { + font-weight: bold; + font-size: 16px; + margin-bottom: 10px; +} + +.input-area input[type="text"] { + padding: 10px; + border: none; + border-bottom: 1px solid #ccc; + width: 100%; + box-sizing: border-box; + margin-bottom: 30px; + font-size: 16px; + background-color: transparent; + transition: border-bottom-color 0.2s; +} + +.input-area input[type="text"]:focus { + border-bottom-color: #444; + outline: none; +} + +/* 출력 영역 */ +.output-area { + display: flex; + flex-direction: column; + align-items: center; + margin-top: 50px; + margin-bottom: 50px; + padding: 20px; + border: 1px solid #ccc; + border-radius: 5px; + background-color: #fff; + font-size: 16px; + font-weight: bold; + color: #444; +} + +/* 폼 */ +form { + max-width: 600px; + margin: 0 auto; +} + +form button[type="submit"] { + background-color: #444; + color: #fff; + padding: 10px 15px; + margin: auto; + display: block; + border: none; + border-radius: 3px; + cursor: pointer; + font-size: 16px; + transition: background-color 0.2s; +} + +form button[type="submit"]:hover { + background-color: #333; +} + +table { + border-collapse: collapse; + margin: 0 auto; + background-color: #fff; + box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); + max-width: 800px; + width: 100%; +} +th, td { + border: 1px solid #ccc; + padding: 8px; + text-align: center; +} +th { + background-color: #f2f2f2; + font-weight: bold; +} + +/* GNB 스타일 */ +.gnb { + display: flex; + justify-content: space-between; + align-items: center; + height: 50px; + background-color: #444; + color: #fff; + padding: 0 20px; +} + +.gnb button { + background-color: #444; + color: #fff; + padding: 10px 15px; + border: none; + border-radius: 3px; + cursor: pointer; +} + +.gnb button:hover { + background-color: #444; +} \ No newline at end of file diff --git a/src/main/resources/static/index.html b/src/main/resources/static/index.html new file mode 100644 index 000000000..c731a65ff --- /dev/null +++ b/src/main/resources/static/index.html @@ -0,0 +1,84 @@ + + +
+ +이동 횟수 | +우승자 | +
---|