Template/Freemarker

SpringBoot + Freemarker 템플릿에서 Context Path얻기

셋부터넷 2020. 9. 25. 13:53

1. Properties 설정

1
spring.freemarker.request-context-attribute: rc
cs

 

 

2. Template에서 사용

1
${rc.getContextPath()}
cs