whycxzp
2020-12-16 0f4c5190746db28618ab0f35e65be41ef8fc78ed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.whyc;
 
import com.spring4all.swagger.EnableSwagger2Doc;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
 
/**
 * @Description : 启动类
 * @date 2020/10/15
 **/
@SpringBootApplication
@EnableWebMvc
@EnableSwagger2
@EnableSwagger2Doc
@ServletComponentScan(basePackages = "com.whyc.filter")
public class Application extends WebMvcConfigurerAdapter {
 
    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
    }
 
    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        super.addResourceHandlers(registry);
 
        registry.addResourceHandler("/**").addResourceLocations("/");
    }
 
}