Skip to content

Commit 0bc3689

Browse files
authored
Merge pull request #21 from CommitField/feature/#6
chore : application.yml file fix
2 parents 5aa255a + 7e884ed commit 0bc3689

File tree

4 files changed

+109
-1
lines changed

4 files changed

+109
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package cmf.commitField.domain.main.main.controller;
2+
3+
import org.springframework.web.bind.annotation.GetMapping;
4+
import org.springframework.web.bind.annotation.RequestMapping;
5+
import org.springframework.web.bind.annotation.ResponseBody;
6+
7+
@RequestMapping
8+
public class ApiV1MainController {
9+
@GetMapping
10+
@ResponseBody
11+
public String getMain() {
12+
return "Hello! cmf main!";
13+
}
14+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package cmf.commitField.global.config;
2+
3+
import lombok.Getter;
4+
import org.springframework.beans.factory.annotation.Value;
5+
6+
public class AppConfig {
7+
@Getter
8+
private static String siteFrontUrl;
9+
@Getter
10+
private static String siteBackUrl;
11+
@Getter
12+
private static String siteCookieDomain;
13+
14+
@Value("${custom.site.frontUrl}")
15+
public void setSiteFrontUrl(String siteFrontUrl) {
16+
this.siteFrontUrl = siteFrontUrl;
17+
}
18+
@Value("${custom.site.backUrl}")
19+
public void setSiteBackUrl(String siteBackUrl) {
20+
this.siteBackUrl = siteBackUrl;
21+
}
22+
@Value("${custom.site.cookieDomain}")
23+
public void setSiteCookieDomain(String siteCookieDomain) {
24+
this.siteCookieDomain = siteCookieDomain;
25+
}
26+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
server:
2+
port: 8090
3+
shutdown: graceful # ์ฒœ์ฒœํžˆ ์ข…๋ฃŒ
4+
spring:
5+
autoconfigure:
6+
exclude:
7+
lifecycle:
8+
# ์Šคํ”„๋ง๋ถ€ํŠธ๊ฐ€ ์ข…๋ฃŒ ์š”์ฒญ์„ ๋ฐ›์€ ํ›„ ๊ธฐ๋‹ค๋ ค์ค„ ์ˆ˜ ์žˆ๋Š” ์ตœ๋Œ€ํ•œ์˜ ์‹œ๊ฐ„
9+
timeout-per-shutdown-phase: 1h
10+
datasource:
11+
url: jdbc:mysql://172.17.0.1:3306/cmf_db
12+
username: root
13+
password: cmf55!!
14+
driver-class-name: com.mysql.cj.jdbc.Driver
15+
data:
16+
redis:
17+
host: 172.17.0.1
18+
port: 6379
19+
password: ${custom.secret.spring.data.redis.password}
20+
jpa:
21+
hibernate:
22+
ddl-auto: update
23+
properties:
24+
hibernate:
25+
format_sql: false
26+
highlight_sql: false
27+
use_sql_comments: false
28+
logging:
29+
level:
30+
com.ll.demo03: INFO
31+
org.hibernate.SQL: INFO
32+
org.hibernate.orm.jdbc.bind: INFO
33+
org.hibernate.orm.jdbc.extract: INFO
34+
org.springframework.transaction.interceptor: INFO

โ€Žsrc/main/resources/application.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,38 @@ spring:
1818
jpa:
1919
open-in-view: false
2020
hibernate:
21-
ddl-auto: update
21+
ddl-auto: update
22+
autoconfigure: # ๋กœ์ปฌ์—์„œ ์‹คํ–‰ํ•  ๋•Œ๋Š” Redis์™€ Session ์„ค์ •์„ ์ œ์™ธ
23+
exclude:
24+
- org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration
25+
- org.springframework.boot.autoconfigure.session.SessionAutoConfiguration
26+
properties:
27+
hibernate:
28+
default_batch_fetch_size: 100
29+
format_sql: true
30+
highlight: true
31+
use_sql_comments: true
32+
websocket:
33+
enabled: true
34+
logging:
35+
level:
36+
cmf.commitField: DEBUG
37+
org.hibernate.SQL: DEBUG
38+
org.hibernate.type.blind: TRACE
39+
org.hibernate.type.extract: TRACE
40+
org.springframework.transaction.interceptor: TRACE
41+
org.springframework: DEBUG
42+
custom:
43+
dev:
44+
cookieDomain: localhost
45+
frontUrl: "http://${custom.dev.cookieDomain}:5173"
46+
backUrl: "http://${custom.dev.cookieDomain}:${server.port}"
47+
prod:
48+
cookieDomain: cmf.seoez.site
49+
frontUrl: "https://www.${custom.prod.cookieDomain}/"
50+
backUrl: "https://api.${custom.prod.cookieDomain}/"
51+
site:
52+
name: "commit-field"
53+
cookieDomain: "${custom.dev.cookieDomain}"
54+
frontUrl: "${custom.dev.frontUrl}"
55+
backUrl: "${custom.dev.backUrl}"

0 commit comments

Comments
ย (0)