Commit bb0990ab by qiuweili123

1.0.11.RELEASE

parents cf68a533 0e01dabd
...@@ -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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -15,7 +15,7 @@ import javax.annotation.Resource; ...@@ -15,7 +15,7 @@ import javax.annotation.Resource;
@Aspect @Aspect
@Component @Component
@ConditionalOnProperty(value = "transaction.support.enabled",havingValue = "true") @ConditionalOnProperty(value = "matrix.aop-transaction.enabled",havingValue = "true")
public class AopTransaction { public class AopTransaction {
@Resource @Resource
private PlatformTransactionManager transactionManager; private PlatformTransactionManager transactionManager;
......
...@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Condition; ...@@ -7,7 +7,7 @@ import org.springframework.context.annotation.Condition;
import org.springframework.context.annotation.ConditionContext; import org.springframework.context.annotation.ConditionContext;
import org.springframework.core.type.AnnotatedTypeMetadata; import org.springframework.core.type.AnnotatedTypeMetadata;
public class ProdEnvCondition implements Condition { public class BateEnvCondition implements Condition {
@Override @Override
public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) { public boolean matches(ConditionContext conditionContext, AnnotatedTypeMetadata annotatedTypeMetadata) {
String[] profiles = conditionContext.getEnvironment().getActiveProfiles(); String[] profiles = conditionContext.getEnvironment().getActiveProfiles();
......
...@@ -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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>logger-starter</artifactId> <artifactId>logger-starter</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>logger-starter</artifactId> <artifactId>logger-starter</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
<packaging>pom</packaging> <packaging>pom</packaging>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<parent> <parent>
<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.6.RELEASE</version> <version>2.1.7.RELEASE</version>
<relativePath/> <relativePath/>
</parent> </parent>
...@@ -45,67 +45,67 @@ ...@@ -45,67 +45,67 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>secoo-log-starter</artifactId> <artifactId>secoo-log-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>secoo-log</artifactId> <artifactId>secoo-log</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>monitor-starter</artifactId> <artifactId>monitor-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>common-core</artifactId> <artifactId>common-core</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>config-starter</artifactId> <artifactId>config-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>common-util</artifactId> <artifactId>common-util</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>redis-starter</artifactId> <artifactId>redis-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>mybatis-starter</artifactId> <artifactId>mybatis-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>mongodb-starter</artifactId> <artifactId>mongodb-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>elasticsearch-starter</artifactId> <artifactId>elasticsearch-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>protocol-starter</artifactId> <artifactId>protocol-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>rocketmq-starter</artifactId> <artifactId>rocketmq-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>openfeign-starter</artifactId> <artifactId>openfeign-starter</artifactId>
<version>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</dependency> </dependency>
<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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
package com.secoo.mall.common.config; package com.secoo.mall.common.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.common.core.condition.BateEnvCondition;
import com.secoo.mall.dubbo.swagger.annotations.EnableDubboSwagger; import com.secoo.mall.dubbo.swagger.annotations.EnableDubboSwagger;
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.ConditionalOnClass; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
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,13 +16,12 @@ import springfox.documentation.spi.DocumentationType; ...@@ -17,13 +16,12 @@ import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2; import springfox.documentation.swagger2.annotations.EnableSwagger2;
;
@Configuration @Configuration
@EnableSwagger2 @EnableSwagger2
@EnableSwaggerBootstrapUI @EnableSwaggerBootstrapUI
@EnableDubboSwagger @EnableDubboSwagger
@ConditionalOnClass(ProdEnvCondition.class) @ConditionalOnClass(BateEnvCondition.class)
public class MatrixSwaggerAutoConfiguration { public class MatrixSwaggerAutoConfiguration {
@Value("${spring.application.name}") @Value("${spring.application.name}")
...@@ -42,15 +40,11 @@ public class MatrixSwaggerAutoConfiguration { ...@@ -42,15 +40,11 @@ public class MatrixSwaggerAutoConfiguration {
.build(); .build();
} }
@Bean
public Docket createDubboApi() { public Docket createDubboApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.groupName("dubbo") .groupName("dubbo");
.select()
.apis(RequestHandlerSelectors.basePackage("com.deepoove.dubbo.provider.springboot"))
.paths(PathSelectors.any())
.build();
} }
private ApiInfo apiInfo() { private ApiInfo apiInfo() {
......
...@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse; ...@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
public class WebUtil { public class WebUtil {
private static String sessionUser = "sessionUser";
public static String getParameter(String name) { public static String getParameter(String name) {
return getRequest().getParameter(name); return getRequest().getParameter(name);
...@@ -40,7 +41,15 @@ public class WebUtil { ...@@ -40,7 +41,15 @@ public class WebUtil {
} }
public static <T> void setAttribute(String name, T obj) { public static <T> void setAttribute(String name, T obj) {
getRequest().setAttribute(name, obj); getRequest().setAttribute(sessionUser, obj);
}
public static <T> void setSessionUser(T obj) {
setAttribute(sessionUser, obj);
}
public static <T> T getSessionUser(Class<T> clazz) {
return getAttribute(sessionUser);
} }
} }
...@@ -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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</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>1.0.10.RELEASE</version> <version>1.0.11.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
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