From 15152da2f87438747c519adcb6237093b34ae2b4 Mon Sep 17 00:00:00 2001
From: whycxzp <perryhsu@163.com>
Date: 星期一, 11 一月 2021 16:47:20 +0800
Subject: [PATCH] update

---
 src/main/java/com/whyc/Application.java |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/src/main/java/com/whyc/Application.java b/src/main/java/com/whyc/Application.java
index 4c76d35..46d331c 100644
--- a/src/main/java/com/whyc/Application.java
+++ b/src/main/java/com/whyc/Application.java
@@ -3,10 +3,14 @@
 import org.springframework.boot.SpringApplication;
 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 : 鍚姩绫�
@@ -14,19 +18,12 @@
  **/
 @SpringBootApplication
 @EnableWebMvc
-@ServletComponentScan(basePackages = "com.whyc.filter")
+@ServletComponentScan(basePackages = {"com.whyc.filter","com.whyc.servlet"})
+@EnableCaching
 public class Application extends WebMvcConfigurerAdapter  implements WebMvcConfigurer {
 
     public static void main(String[] args) {
         SpringApplication.run(Application.class,args);
-    }
-
-    @Override
-    public void addResourceHandlers(ResourceHandlerRegistry registry) {
-        //super.addResourceHandlers(registry);
-        //registry.addResourceHandler("/**").addResourceLocations("/");
-        registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
-        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
     }
 
 }

--
Gitblit v1.9.1