| | |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.web.servlet.ServletComponentScan; |
| | | import org.springframework.cache.annotation.EnableCaching; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.web.servlet.config.annotation.EnableWebMvc; |
| | | import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; |
| | | import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; |
| | | import org.springframework.web.servlet.view.InternalResourceViewResolver; |
| | | |
| | | /** |
| | | * @Description : 启动类 |
| | |
| | | @ServletComponentScan(basePackages = {"com.whyc.filter","com.whyc.servlet"}) |
| | | @EnableCaching |
| | | public class Application extends WebMvcConfigurerAdapter implements WebMvcConfigurer { |
| | | //public class Application extends SpringBootServletInitializer { |
| | | |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(Application.class,args); |
| | | } |
| | | |
| | | /*war改造*/ |
| | | /*@Override |
| | | protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
| | | return builder.sources(Application.class); |
| | | }*/ |
| | | } |