Skip to content

Commit

Permalink
Merge pull request #12 from nhnacademy-be4-My-Books/feature/layout-se…
Browse files Browse the repository at this point in the history
…tting

Feature/layout setting
  • Loading branch information
minsu11 authored Feb 23, 2024
2 parents 0095b89 + a8cfaea commit e3217cc
Show file tree
Hide file tree
Showing 1,895 changed files with 203,407 additions and 1,411 deletions.
6 changes: 6 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>nz.net.ultraq.thymeleaf</groupId>
<artifactId>thymeleaf-layout-dialect</artifactId>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package store.mybooks.front.admin.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
* packageName : store.mybooks.front.admin.controller<br>
* fileName : AdminController<br>
* author : minsu11<br>
* date : 2/22/24<br>
* description :
* ===========================================================<br>
* DATE AUTHOR NOTE<br>
* -----------------------------------------------------------<br>
* 2/22/24 minsu11 최초 생성<br>
*/
@Controller
@RequestMapping("/admin")
public class AdminController {
/**
* get 요청이 들어오면 관리자 페이지를 반환
*
* @return 관리자 페이지 파일 명
*/
@GetMapping
public String doAdmin() {

return "admin";

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package store.mybooks.front.book.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
* packageName : store.mybooks.front.book.controller<br>
* fileName : BookController<br>
* author : minsu11<br>
* date : 2/22/24<br>
* description :
* ===========================================================<br>
* DATE AUTHOR NOTE<br>
* -----------------------------------------------------------<br>
* 2/22/24 minsu11 최초 생성<br>
*/
@Controller
@RequestMapping("/book")
public class BookController {
@GetMapping
public String get() {

return "my-books-layout";
}
}
10 changes: 10 additions & 0 deletions src/main/resources/Template Main/admin.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
layout:decorate="~{common/layout/admin-layout}">

<div layout:fragment="content">
<h1>layout test</h1>
</div>

</html>
Loading

0 comments on commit e3217cc

Please sign in to comment.