Skip to content

Commit

Permalink
thymeleaf test 위한 설정
Browse files Browse the repository at this point in the history
- static index 설정
  • Loading branch information
bhkimz committed Nov 16, 2021
1 parent 55e38c6 commit 48db9e4
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 7 deletions.
25 changes: 25 additions & 0 deletions src/main/resources/application-oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,31 @@ spring:
max-lifetime: 240000
pool-name: oraPool

# static/index.html 의 경로가 http://localhost:8080/static/index.html 의 경로로 처리 되도록 함.
# 기본은 http://localhost:8080/index.html root 로 설정되어 있음
mvc:
static-path-pattern: /static/** # 기본값 /**

# 테스트 용도 classpath:/META-INF/resources/ -> file path 적용은 빌드 결과물을 사용하는것이 아니라 UI 변경 수정시 확인 용이 하도록 하기 위함.
# For Test [[
web:
resources:
static-locations:
# - classpath:/META-INF/resources/
# - classpath:/resources/
# - classpath:/static/
# - classpath:/public/
- file:src/main/resources/static/
- file:src/main/resources/
- file:src/main/public/
add-mappings: true

thymeleaf:
# prefix: classpath:/templates/
prefix: file:src/main/resources/templates/
cache: false
# ]]

mybatis:
type-aliases-package: com.powernote.skeleton.mapper #

29 changes: 28 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,32 @@ spring:
max-lifetime: 240000
maximum-pool-size: 20


# static/index.html 의 경로가 http://localhost:8080/static/index.html 의 경로로 처리 되도록 함.
# 기본은 http://localhost:8080/index.html root 로 설정되어 있음
mvc:
static-path-pattern: /static/** # 기본값 /**

# 테스트 용도 classpath:/META-INF/resources/ -> file path 적용은 빌드 결과물을 사용하는것이 아니라 UI 변경 수정시 확인 용이 하도록 하기 위함.
# For Test [[
web:
resources:
static-locations:
# - classpath:/META-INF/resources/
# - classpath:/resources/
# - classpath:/static/
# - classpath:/public/
- file:src/main/resources/static/
- file:src/main/resources/
- file:src/main/public/
add-mappings: true

thymeleaf:
# prefix: classpath:/templates/
prefix: file:src/main/resources/templates/
cache: false
# ]]

mybatis:
type-aliases-package: com.powernote.skeleton.mapper #
type-aliases-package: com.powernote.skeleton.mapper #

10 changes: 10 additions & 0 deletions src/main/resources/static/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
Hello static index Page
</body>
</html>
7 changes: 1 addition & 6 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<title>Title</title>
</head>
<body>

Hello thymeleaf Page




Hello thymeleaf index Page
</body>
</html>

0 comments on commit 48db9e4

Please sign in to comment.