Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.lynas.config;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.ComponentScan;
- import org.springframework.context.annotation.Configuration;
- import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
- import org.springframework.web.servlet.config.annotation.EnableWebMvc;
- import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
- import org.springframework.web.servlet.view.InternalResourceViewResolver;
- @Configuration
- @EnableWebMvc
- @ComponentScan("com.lynas")
- public class WebConfig extends WebMvcConfigurerAdapter {
- @Bean
- public InternalResourceViewResolver irvr() {
- InternalResourceViewResolver irvr = new InternalResourceViewResolver();
- irvr.setPrefix("/");
- irvr.setSuffix(".jsp");
- return irvr;
- }
- @Override
- public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
- super.configureDefaultServletHandling(configurer);
- configurer.enable();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement