-
day66 - Spring Framework(mvc)KIC/Spring 2021. 9. 17. 14:26반응형
[MvcQuickStartConfig]
package controller; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.view.InternalResourceViewResolver; @Configuration @EnableWebMvc public class MvcQuickStartConfig { @Bean public InternalResourceViewResolver viewResolver() { InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/WEB-INF/view/"); viewResolver.setSuffix(".jsp"); return viewResolver; } @Bean public HelloController2 helloController() { return new HelloController2(); } }
300x250'KIC > Spring' 카테고리의 다른 글
day68 - 스프링 팀 프로젝트 관리자 페이지 구현 (0) 2021.09.27 day67 - Spring Framework(mvc) (0) 2021.09.23 day65 - Spring Framework(스프링, Annotation) (0) 2021.09.15 day64 - Spring Framework(스프링, AOP) (0) 2021.09.14 day63 - Spring Framework(스프링, AOP) (0) 2021.09.13