|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.gszc;
|
|
|
|
|
|
|
|
|
|
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
|
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
|
@ -10,6 +11,7 @@ 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 springfox.documentation.swagger2.annotations.EnableSwagger2;
|
|
|
|
|
import tk.mybatis.spring.annotation.MapperScan;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -20,6 +22,8 @@ import tk.mybatis.spring.annotation.MapperScan;
|
|
|
|
|
@EnableWebMvc
|
|
|
|
|
@SpringBootApplication
|
|
|
|
|
@EnableConfigurationProperties
|
|
|
|
|
@EnableSwaggerBootstrapUI
|
|
|
|
|
@EnableSwagger2
|
|
|
|
|
@MapperScan(basePackages = "com.gszc.mapper")
|
|
|
|
|
public class Application extends WebMvcConfigurerAdapter implements WebMvcConfigurer {
|
|
|
|
|
|
|
|
|
@ -33,7 +37,7 @@ public class Application extends WebMvcConfigurerAdapter implements WebMvcConfig
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
|
|
|
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
|
|
|
|
registry.addResourceHandler("/doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
|
|
|
|
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|