Swagger改用Starter

This commit is contained in:
macro
2022-06-25 15:40:33 +08:00
parent 4fc1755441
commit 2f7b30b1df
9 changed files with 93 additions and 17 deletions

View File

@@ -2,6 +2,8 @@ package com.macro.mall.demo.config;
import com.macro.mall.common.config.BaseSwaggerConfig;
import com.macro.mall.common.domain.SwaggerProperties;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@@ -25,4 +27,9 @@ public class SwaggerConfig extends BaseSwaggerConfig {
.build();
}
@Bean
public BeanPostProcessor springfoxHandlerProviderBeanPostProcessor() {
return generateBeanPostProcessor();
}
}

View File

@@ -5,7 +5,7 @@ spring:
application:
name: mall-demo
datasource:
url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
url: jdbc:mysql://localhost:3306/mall?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai&useSSL=false
username: root
password: root
thymeleaf:
@@ -14,6 +14,10 @@ spring:
servlet:
content-type: text/html
cache: false #开发时关闭缓存,不然没法看到实时页面
mvc:
pathmatch:
matching-strategy: ant_path_matcher
mybatis:
mapper-locations:
- classpath:mapper/*.xml