升级支持SpringCloud 2021,Knife4j版本升级

This commit is contained in:
macro
2022-07-24 10:22:40 +08:00
parent 84707bba02
commit e7b1b01f39
35 changed files with 247 additions and 113 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

@@ -1,8 +1,11 @@
server:
port: 8082
spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
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
mybatis:

View File

@@ -2,14 +2,12 @@ package com.macro.mall;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.macro.mall.model.PmsProduct;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class MallDemoApplicationTests {
private Logger logger = LoggerFactory.getLogger(MallDemoApplicationTests.class);