Java/Spring Boot(70)
-
Spring Boot 설치
STS 다운로드 : https://spring.io/tools Spring Tools 4 is the next generation of Spring tooling Largely rebuilt from scratch, Spring Tools 4 provides world-class support for developing Spring-based enterprise applications, whether you prefer Eclipse, Visual Studio Code, or Theia IDE. spring.io https://download.springsource.com/release/STS4/4.13.0.RELEASE/dist/e4.22/spring-tool-suite-4-4.13.0.RELEASE-..
2021.12.25 -
파일 UTF-8 셋팅
1. Window > Preferences > General > Content types Text Default encoding: UTF-8 2. Window > Preferences > General > Workspace Text file encoding Other: UTF-8
2021.09.12 -
Spring boot index.html 설정
http://localhost:8081로 접속시 index.html 화면이 나오도록 설정 @GetMapping("/") public String index() { return "forward:/index.html"; }
2021.04.05 -
Spring boot WebMvcConfigurer jsp 셋팅
'/WEB-INF/jsp/'에서 마지막에 '/'가 빠지면 인식 못함 import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ViewResolverRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @ComponentScan public class WebConfig implements WebMvcConfigurer { @Override public void configureViewResolvers(ViewResolverRegis..
2021.04.05 -
WebMvcConfigurerAdapter is deprecated
Spring 5, Spring boot 2를 사용하면 발생 WebMvcConfigurer interface를 대신 사용하면 됨
2021.04.05 -
Spring boot thymeleaf 적용
1. pom.xml org.springframework.boot spring-boot-starter-thymeleaf 2. application.propertiesspring.thymeleaf.prefix=classpath:templates/spring.thymeleaf.suffix=.html#개발모드에는 false 셋팅spring.thymeleaf.cache=falsespring.thymeleaf.view-names=thymeleaf/*3. Controller @GetMapping("/cors.do") public String cors(Model model) { # /resources/templates/thymeleaf/cors.html을 찾음 return "thymel..
2021.03.31