Commit 3a5754a4 by qiuweili123

modify version

parent 6a6dc751
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
package com.secoo.mall.common.core.condition;
import com.secoo.mall.common.constant.CommonConstant;
import org.apache.commons.lang3.ArrayUtils;
import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata;
public class ProdEnvCondition implements Condition {
@Override
public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
String[] profiles = conditionContext.getEnvironment().getActiveProfiles();
return !ArrayUtils.contains(profiles, CommonConstant.Env.PROD);
}
}
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
<packaging>pom</packaging> <packaging>pom</packaging>
...@@ -28,67 +28,67 @@ ...@@ -28,67 +28,67 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version> <version>2.1.4.RELEASE</version>
<relativePath /> <relativePath/>
</parent> </parent>
<properties> <properties>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<dubbo.version>2.7.1</dubbo.version> <dubbo.version>2.7.1</dubbo.version>
<matrix.version>1.0.1-DEV-SNAPSHOT</matrix.version>
</properties> </properties>
<dependencyManagement> <dependencyManagement>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>common-core</artifactId> <artifactId>common-core</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>common-util</artifactId> <artifactId>common-util</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>redis-starter</artifactId> <artifactId>redis-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>mybatis-starter</artifactId> <artifactId>mybatis-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>mongodb-starter</artifactId> <artifactId>mongodb-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>elasticsearch-starter</artifactId> <artifactId>elasticsearch-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>dubbo-starter</artifactId> <artifactId>dubbo-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>web-starter</artifactId> <artifactId>web-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>rocketmq-starter</artifactId> <artifactId>rocketmq-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>openfeign-starter</artifactId> <artifactId>openfeign-starter</artifactId>
<version>0.1-SNAPSHOT</version> <version>${matrix.version}</version>
</dependency> </dependency>
<!--spring cloud--> <!--spring cloud-->
<dependency> <dependency>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>0.1-SNAPSHOT</version> <version>1.0.1-DEV-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -17,10 +17,6 @@ ...@@ -17,10 +17,6 @@
<artifactId>common-util</artifactId> <artifactId>common-util</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>common-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
......
package com.secoo.mall.web.config; package com.secoo.mall.web.config;
import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI; import com.github.xiaoymin.swaggerbootstrapui.annotations.EnableSwaggerBootstrapUI;
import com.secoo.mall.common.core.condition.ProdEnvCondition;
import com.secoo.mall.web.annotation.ApiController; import com.secoo.mall.web.annotation.ApiController;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.PathSelectors;
...@@ -17,7 +19,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -17,7 +19,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration @Configuration
@EnableSwagger2 @EnableSwagger2
@EnableSwaggerBootstrapUI @EnableSwaggerBootstrapUI
@ConditionalOnProperty(name = "swagger.enable", havingValue = "true") @Conditional(ProdEnvCondition.class)
public class SwaggerConfig { public class SwaggerConfig {
@Value("${spring.application.name}") @Value("${spring.application.name}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment