Skip to content

Commit

Permalink
feat: 첫 화면 thymeleaf 파일로 교체
Browse files Browse the repository at this point in the history
head 태그는 layout/header.html 파일로 분리
  • Loading branch information
jxmen committed Jun 7, 2024
1 parent b028b9b commit 3065af2
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ http-client.private.env.json

### Act Env File ###
my.secrets

### ToDo File ###
todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ package dev.jxmen.cs.ai.interviewer

import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
import org.springframework.stereotype.Controller
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.RestController

@SpringBootApplication
open class CsAiInterviewerApplication
class CsAiInterviewerApplication

fun main(args: Array<String>) {
runApplication<CsAiInterviewerApplication>(*args)
}

@RestController
@Controller
class IndexController {
@GetMapping("/")
fun hello(): String {
return "Hello, World!"
fun index(): String {
return "index"
}
}
9 changes: 9 additions & 0 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!doctype html>
<html lang="ko">
<th:block th:replace="~{layout/header :: header}"></th:block>
<body>

<p1>Hello World!</p1>

</body>
</html>
12 changes: 12 additions & 0 deletions src/main/resources/templates/layout/header.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="ko" xmlns:th="http://www.thymeleaf.org">
<th:block th:fragment="header">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>cs-ai-interviewer</title>
</head>
</th:block>
</html>

0 comments on commit 3065af2

Please sign in to comment.