蔡雨生 6 years ago
parent b76e445294
commit b1f45d19e9

@ -115,7 +115,7 @@
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>swagger-bootstrap-ui</artifactId>
<version>1.9.4</version>
<version>1.9.3</version>
</dependency>
<dependency>

@ -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/");
}

@ -1,6 +1,6 @@
#服务器端口号配置
server:
port: 8080
port: 8087
#数据源配置
spring:
# mvc:

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
<display-name>gszc</display-name>
</web-app>
Loading…
Cancel
Save