!306 注释 @EnableCustomSwagger2 注解后,项目启动失败

Merge pull request !306 from Gelis/master
pull/310/MERGE
若依 2 years ago committed by Gitee
commit 55447c72e9
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -26,8 +26,9 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@EnableSwagger2
@EnableAutoConfiguration
@EnableConfigurationProperties(SwaggerProperties.class)
@ConditionalOnProperty(name = "swagger.enabled", matchIfMissing = true)
@Import({SwaggerBeanPostProcessor.class, SwaggerWebConfiguration.class})
public class SwaggerAutoConfiguration
{
/**
@ -37,13 +38,6 @@ public class SwaggerAutoConfiguration
private static final String BASE_PATH = "/**";
@Bean
@ConditionalOnMissingBean
public SwaggerProperties swaggerProperties()
{
return new SwaggerProperties();
}
@Bean
public Docket api(SwaggerProperties swaggerProperties)
{

@ -16,7 +16,6 @@ import java.util.stream.Collectors;
*
* @author ruoyi
*/
@Component
public class SwaggerBeanPostProcessor implements BeanPostProcessor
{
@Override

@ -5,7 +5,6 @@ import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@ConfigurationProperties("swagger")
public class SwaggerProperties
{

@ -9,7 +9,6 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
*
* @author ruoyi
*/
@Configuration
public class SwaggerWebConfiguration implements WebMvcConfigurer
{
@Override

@ -1,3 +1,3 @@
com.ruoyi.common.swagger.config.SwaggerAutoConfiguration
com.ruoyi.common.swagger.config.SwaggerWebConfiguration
com.ruoyi.common.swagger.config.SwaggerBeanPostProcessor
# com.ruoyi.common.swagger.config.SwaggerAutoConfiguration
# com.ruoyi.common.swagger.config.SwaggerWebConfiguration
# com.ruoyi.common.swagger.config.SwaggerBeanPostProcessor

Loading…
Cancel
Save