From 0c3589a40928d5783687ab07f40b11281fa2e07b Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Mon, 11 Dec 2017 12:17:08 +0800 Subject: [PATCH 01/16] =?UTF-8?q?=E5=8F=96=E6=B6=88Springboot=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=8A=A0=E8=BD=BD=E9=BB=98=E8=AE=A4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E6=BA=90=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/cn/binux/XbinStoreServiceAdminApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceItemApplication.java | 3 ++- .../java/cn/binux/XbinStoreServiceNotifyApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceOrderApplication.java | 3 ++- .../java/cn/binux/XbinStoreServicePortalApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceRedisApplication.java | 3 ++- xbin-store-service-search-api/pom.xml | 5 +++++ .../java/cn/binux/XbinStoreServiceSearchApplication.java | 3 ++- .../main/java/cn/binux/XbinStoreServiceSSOApplication.java | 3 ++- 9 files changed, 21 insertions(+), 8 deletions(-) diff --git a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java index f9a3fe4..f5083bd 100644 --- a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java +++ b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java @@ -5,12 +5,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceAdminApplication { diff --git a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java index 874329b..220c3f0 100644 --- a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java +++ b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceItemApplication { diff --git a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java index 95b7f4f..bb41bb3 100644 --- a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java +++ b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java @@ -3,11 +3,12 @@ package cn.binux; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceNotifyApplication { public static void main(String[] args) { diff --git a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java index 2eaaccf..2b633d9 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java +++ b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceOrderApplication { diff --git a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java index 7d9f478..5b22c4c 100644 --- a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java +++ b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServicePortalApplication { diff --git a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java index 75adb03..d78b551 100644 --- a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java +++ b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java @@ -4,11 +4,12 @@ import com.alibaba.dubbo.container.Main; import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceRedisApplication { public static void main(String[] args) { diff --git a/xbin-store-service-search-api/pom.xml b/xbin-store-service-search-api/pom.xml index 31c9ef2..ee2bca1 100644 --- a/xbin-store-service-search-api/pom.xml +++ b/xbin-store-service-search-api/pom.xml @@ -18,6 +18,11 @@ xbin-store-common 1.0-SNAPSHOT + + cn.binux + xbin-store-common-pojo + 1.0-SNAPSHOT + jar diff --git a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java index f15aa1d..3543c5f 100644 --- a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java +++ b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java @@ -4,11 +4,12 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @MapperScan(basePackages = "cn.binux.search.mapper") public class XbinStoreServiceSearchApplication { diff --git a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java index 42503c8..7cb9273 100644 --- a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java +++ b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java @@ -4,12 +4,13 @@ import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableApolloConfig -@SpringBootApplication +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceSSOApplication { -- Gitee From 5492ac5555003300b45d1b232b6a9d1a3e55f40b Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Tue, 19 Dec 2017 09:25:24 +0800 Subject: [PATCH 02/16] =?UTF-8?q?=E5=8A=A9=E5=90=84=E4=BD=8DDeveloper?= =?UTF-8?q?=E9=A1=BA=E5=88=A9=E7=BC=96=E8=AF=91=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xbin-store-common/pom.xml | 32 ++++++++++++++++--- xbin-store-service-admin/pom.xml | 5 ++- .../XbinStoreServiceAdminApplication.java | 4 +-- xbin-store-service-cart/pom.xml | 5 ++- .../XbinStoreServiceCartApplication.java | 7 ++-- xbin-store-service-item/pom.xml | 4 +++ .../XbinStoreServiceItemApplication.java | 4 +-- xbin-store-service-notify/pom.xml | 16 ++++++++-- .../XbinStoreServiceNotifyApplication.java | 4 +-- xbin-store-service-order/pom.xml | 10 +++++- .../XbinStoreServiceOrderApplication.java | 4 +-- xbin-store-service-portal/pom.xml | 5 ++- .../XbinStoreServicePortalApplication.java | 4 +-- xbin-store-service-redis/pom.xml | 18 ++++++++++- .../XbinStoreServiceRedisApplication.java | 4 +-- xbin-store-service-search/pom.xml | 5 +++ .../XbinStoreServiceSearchApplication.java | 4 +-- xbin-store-service-sso/pom.xml | 9 +++++- .../binux/XbinStoreServiceSSOApplication.java | 4 +-- xbin-store-web-cart/pom.xml | 10 +++--- .../cn/binux/XbinStoreWebCartApplication.java | 4 +-- .../cn/binux/XbinStoreWebItemApplication.java | 4 +-- .../binux/XbinStoreWebOrderApplication.java | 4 +-- .../binux/XbinStoreWebPortalApplication.java | 4 +-- .../cn/binux/XbinStoreWebSSOApplication.java | 4 +-- 25 files changed, 131 insertions(+), 47 deletions(-) diff --git a/xbin-store-common/pom.xml b/xbin-store-common/pom.xml index afeb4c5..3b6feca 100644 --- a/xbin-store-common/pom.xml +++ b/xbin-store-common/pom.xml @@ -63,11 +63,11 @@ junit junit - - - org.slf4j - slf4j-log4j12 - + + + + + @@ -83,6 +83,10 @@ cn.binux spring-boot-starter-dubbox + + com.alibaba + dubbo + org.apache.tomcat.embed tomcat-embed-core @@ -220,10 +224,28 @@ commons-lang 2.6 + + org.springframework + spring-beans + 4.3.13.RELEASE + + + + redis.clients + jedis + + + mysql + mysql-connector-java + + + org.apache.commons + commons-pool2 + diff --git a/xbin-store-service-admin/pom.xml b/xbin-store-service-admin/pom.xml index ef2fcc2..4238909 100644 --- a/xbin-store-service-admin/pom.xml +++ b/xbin-store-service-admin/pom.xml @@ -70,7 +70,10 @@ - + + com.alibaba + druid + diff --git a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java index f5083bd..8c97fab 100644 --- a/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java +++ b/xbin-store-service-admin/src/main/java/cn/binux/XbinStoreServiceAdminApplication.java @@ -1,7 +1,7 @@ package cn.binux; import com.alibaba.dubbo.container.Main; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-cart/pom.xml b/xbin-store-service-cart/pom.xml index 0df2827..09561b1 100644 --- a/xbin-store-service-cart/pom.xml +++ b/xbin-store-service-cart/pom.xml @@ -69,7 +69,10 @@ - + + com.alibaba + druid + diff --git a/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java b/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java index 2b84d48..a851c63 100644 --- a/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java +++ b/xbin-store-service-cart/src/main/java/cn/binux/XbinStoreServiceCartApplication.java @@ -1,15 +1,16 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig -@SpringBootApplication +//@EnableApolloConfig +@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") public class XbinStoreServiceCartApplication { diff --git a/xbin-store-service-item/pom.xml b/xbin-store-service-item/pom.xml index b8907ed..ea7173e 100644 --- a/xbin-store-service-item/pom.xml +++ b/xbin-store-service-item/pom.xml @@ -78,6 +78,10 @@ org.freemarker freemarker + + com.alibaba + druid + diff --git a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java index 220c3f0..33c5893 100644 --- a/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java +++ b/xbin-store-service-item/src/main/java/cn/binux/XbinStoreServiceItemApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-notify/pom.xml b/xbin-store-service-notify/pom.xml index 92b724d..42830ab 100644 --- a/xbin-store-service-notify/pom.xml +++ b/xbin-store-service-notify/pom.xml @@ -57,8 +57,20 @@ xbin-store-service-redis-api 1.0-SNAPSHOT - - + + org.springframework.boot + spring-boot + + + org.springframework.boot + spring-boot-autoconfigure + + + cn.binux + xbin-store-common-mapper + 1.0-SNAPSHOT + + diff --git a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java index bb41bb3..7d9d186 100644 --- a/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java +++ b/xbin-store-service-notify/src/main/java/cn/binux/XbinStoreServiceNotifyApplication.java @@ -1,13 +1,13 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceNotifyApplication { diff --git a/xbin-store-service-order/pom.xml b/xbin-store-service-order/pom.xml index 40edf07..6c53fcf 100644 --- a/xbin-store-service-order/pom.xml +++ b/xbin-store-service-order/pom.xml @@ -49,7 +49,7 @@ org.apache.activemq - activemq-all + activemq-pool cn.binux @@ -82,6 +82,14 @@ org.freemarker freemarker + + com.alibaba + druid + + + cn.binux + spring-boot-starter-druid + diff --git a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java index 2b633d9..8243e02 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java +++ b/xbin-store-service-order/src/main/java/cn/binux/XbinStoreServiceOrderApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-portal/pom.xml b/xbin-store-service-portal/pom.xml index 97dcd90..a6d2949 100644 --- a/xbin-store-service-portal/pom.xml +++ b/xbin-store-service-portal/pom.xml @@ -69,7 +69,10 @@ - + + com.alibaba + druid + diff --git a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java index 5b22c4c..9c11b68 100644 --- a/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java +++ b/xbin-store-service-portal/src/main/java/cn/binux/XbinStoreServicePortalApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-service-redis/pom.xml b/xbin-store-service-redis/pom.xml index 167a3c2..fbe9651 100644 --- a/xbin-store-service-redis/pom.xml +++ b/xbin-store-service-redis/pom.xml @@ -58,7 +58,23 @@ xbin-store-service-redis-api 1.0-SNAPSHOT - + + org.springframework.boot + spring-boot-autoconfigure + + + cn.binux + xbin-store-common-mapper + 1.0-SNAPSHOT + + + com.google.guava + guava + 20.0 + + + + diff --git a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java index d78b551..46c5615 100644 --- a/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java +++ b/xbin-store-service-redis/src/main/java/cn/binux/XbinStoreServiceRedisApplication.java @@ -1,14 +1,14 @@ package cn.binux; import com.alibaba.dubbo.container.Main; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) public class XbinStoreServiceRedisApplication { diff --git a/xbin-store-service-search/pom.xml b/xbin-store-service-search/pom.xml index 65628c0..164ac8d 100644 --- a/xbin-store-service-search/pom.xml +++ b/xbin-store-service-search/pom.xml @@ -78,6 +78,11 @@ org.apache.activemq activemq-all + + + com.alibaba + druid + diff --git a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java index 3543c5f..5cf1ffe 100644 --- a/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java +++ b/xbin-store-service-search/src/main/java/cn/binux/XbinStoreServiceSearchApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -8,7 +8,7 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @MapperScan(basePackages = "cn.binux.search.mapper") public class XbinStoreServiceSearchApplication { diff --git a/xbin-store-service-sso/pom.xml b/xbin-store-service-sso/pom.xml index 37d5261..674a043 100644 --- a/xbin-store-service-sso/pom.xml +++ b/xbin-store-service-sso/pom.xml @@ -74,7 +74,14 @@ xbin-store-service-redis-api 1.0-SNAPSHOT - + + cn.binux + spring-boot-starter-druid + + + com.alibaba + druid + diff --git a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java index 7cb9273..430de6b 100644 --- a/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java +++ b/xbin-store-service-sso/src/main/java/cn/binux/XbinStoreServiceSSOApplication.java @@ -1,6 +1,6 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -9,7 +9,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) @EnableTransactionManagement @MapperScan(basePackages = "cn.binux.mapper") diff --git a/xbin-store-web-cart/pom.xml b/xbin-store-web-cart/pom.xml index f5f246f..b5d94f9 100644 --- a/xbin-store-web-cart/pom.xml +++ b/xbin-store-web-cart/pom.xml @@ -84,11 +84,11 @@ spring-boot-starter-test test - - org.springframework.boot - spring-boot-devtools - true - + + + + + diff --git a/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java b/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java index 1fa7c0d..01e89f2 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/XbinStoreWebCartApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebCartApplication { diff --git a/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java b/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java index 01f55ce..2416161 100644 --- a/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java +++ b/xbin-store-web-item/src/main/java/cn/binux/XbinStoreWebItemApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebItemApplication { diff --git a/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java b/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java index 300e70d..0f661ff 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java +++ b/xbin-store-web-order/src/main/java/cn/binux/XbinStoreWebOrderApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebOrderApplication { diff --git a/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java b/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java index f993c43..1af4e63 100644 --- a/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java +++ b/xbin-store-web-portal/src/main/java/cn/binux/XbinStoreWebPortalApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebPortalApplication { diff --git a/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java b/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java index 5d0d889..3b840f7 100644 --- a/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java +++ b/xbin-store-web-sso/src/main/java/cn/binux/XbinStoreWebSSOApplication.java @@ -1,12 +1,12 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication public class XbinStoreWebSSOApplication { -- Gitee From 0e580d7129a36888a69fefbb89d1149d8d4278ce Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Thu, 21 Dec 2017 18:11:02 +0800 Subject: [PATCH 03/16] =?UTF-8?q?1=E3=80=81=E4=BD=9C=E4=B8=BA=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E7=89=88=E6=9C=AC=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=BC=80=E5=8F=91=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=202=E3=80=81=E4=BF=AE=E5=A4=8D=E9=A6=96=E9=A1=B5=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E4=B8=8D=E8=83=BD=E8=AE=B0=E5=BD=95=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 11 +- .../src/main/resources/application-dev.yml | 82 ++++++++++++++ .../src/main/resources/application.yml | 85 +-------------- .../src/main/resources/application-dev.yml | 98 +++++++++++++++++ .../src/main/resources/application.yml | 101 +----------------- .../src/main/resources/application-dev.yml | 83 ++++++++++++++ .../src/main/resources/application.yml | 86 +-------------- .../src/main/resources/application-dev.yml | 46 ++++++++ .../src/main/resources/application.yml | 49 +-------- .../src/main/resources/application-dev.yml | 78 ++++++++++++++ .../src/main/resources/application.yml | 81 +------------- .../src/main/resources/application-dev.yml | 78 ++++++++++++++ .../src/main/resources/application.yml | 83 +------------- .../src/main/resources/application-dev.yml | 34 ++++++ .../src/main/resources/application.yml | 36 +------ .../src/main/resources/application-dev.yml | 80 ++++++++++++++ .../src/main/resources/application.yml | 81 +------------- .../src/main/resources/application-dev.yml | 94 ++++++++++++++++ .../src/main/resources/application.yml | 97 +---------------- .../binux/cart/controller/CartController.java | 12 ++- .../src/main/resources/application-dev.yml | 40 +++++++ .../src/main/resources/application.yml | 41 +------ .../src/main/resources/templates/cart.html | 2 +- .../src/main/resources/application-dev.yml | 35 ++++++ .../src/main/resources/application.yml | 36 +------ .../order/controller/OrderController.java | 28 +++-- .../src/main/resources/application-dev.yml | 47 ++++++++ .../src/main/resources/application.yml | 48 +-------- .../portal/controller/IndexController.java | 34 +++++- .../src/main/resources/application-dev.yml | 43 ++++++++ .../src/main/resources/application.yml | 40 +------ .../src/main/resources/templates/index.html | 56 ++++++++++ .../src/main/resources/application-dev.yml | 49 +++++++++ .../src/main/resources/application.yml | 50 +-------- 34 files changed, 1044 insertions(+), 900 deletions(-) create mode 100644 xbin-store-service-admin/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-cart/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-item/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-notify/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-order/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-portal/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-redis/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-search/src/main/resources/application-dev.yml create mode 100644 xbin-store-service-sso/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-cart/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-item/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-order/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-portal/src/main/resources/application-dev.yml create mode 100644 xbin-store-web-sso/src/main/resources/application-dev.yml diff --git a/pom.xml b/pom.xml index 33fbdbd..54fbd59 100644 --- a/pom.xml +++ b/pom.xml @@ -38,6 +38,7 @@ xbin-store-service-order-api xbin-store-service-order xbin-store-web-order + da-redis-consumer @@ -476,11 +477,11 @@ ${lombok.version} provided - - - - - + + com.ctrip.framework.apollo + apollo-client + ${apollo.version} + diff --git a/xbin-store-service-admin/src/main/resources/application-dev.yml b/xbin-store-service-admin/src/main/resources/application-dev.yml new file mode 100644 index 0000000..6e2f202 --- /dev/null +++ b/xbin-store-service-admin/src/main/resources/application-dev.yml @@ -0,0 +1,82 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-admin + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.admin + protocol: + name: dubbo + port: 20880 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + # 首页广告 + index_ad: 'INDEX_AD' +server: + port: 8510 + +storage: + type: fastdfs + fastdfs: + tracker_server: 192.168.125.129:22122 + \ No newline at end of file diff --git a/xbin-store-service-admin/src/main/resources/application.yml b/xbin-store-service-admin/src/main/resources/application.yml index 1ae6747..caf4dfc 100644 --- a/xbin-store-service-admin/src/main/resources/application.yml +++ b/xbin-store-service-admin/src/main/resources/application.yml @@ -1,82 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-admin - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.admin - protocol: - name: dubbo - port: 20880 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - # 首页广告 - index_ad: 'INDEX_AD' -server: - port: 8510 - -storage: - type: fastdfs - fastdfs: - tracker_server: 192.168.125.129:22122 - \ No newline at end of file +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-cart/src/main/resources/application-dev.yml b/xbin-store-service-cart/src/main/resources/application-dev.yml new file mode 100644 index 0000000..5477674 --- /dev/null +++ b/xbin-store-service-cart/src/main/resources/application-dev.yml @@ -0,0 +1,98 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-cart + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.cart + protocol: + name: dubbo + port: 20887 + host: 127.0.0.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: +# 购物车 + cart_info_profix: 'CART_INFO:' +# 商品 + item_info_profix: 'ITEM_INFO:' + item_info_base_suffix: ':BASE' + item_info_desc_suffix: ':DESC' + # Redis 缓存时间 默认3天 + redis_cart_expire_time: 259200 + + +login: + # 验证名 + validation: + #登录名 + ispinengaged: isPinEngaged + #邮箱 + isemailengaged: isEmailEngaged + #手机 + ismobileengaged: isMobileEngaged + # 推荐登录名后缀随机数取值范围 + random_number: 50000 + # 登录成功页面 + success_url: http://localhost:8104/success + +server: + port: 8517 diff --git a/xbin-store-service-cart/src/main/resources/application.yml b/xbin-store-service-cart/src/main/resources/application.yml index 32fc9a0..caf4dfc 100644 --- a/xbin-store-service-cart/src/main/resources/application.yml +++ b/xbin-store-service-cart/src/main/resources/application.yml @@ -1,98 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-cart - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.cart - protocol: - name: dubbo - port: 20887 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: -# 购物车 - cart_info_profix: 'CART_INFO:' -# 商品 - item_info_profix: 'ITEM_INFO:' - item_info_base_suffix: ':BASE' - item_info_desc_suffix: ':DESC' - # Redis 缓存时间 默认3天 - redis_cart_expire_time: 259200 - - -login: - # 验证名 - validation: - #登录名 - ispinengaged: isPinEngaged - #邮箱 - isemailengaged: isEmailEngaged - #手机 - ismobileengaged: isMobileEngaged - # 推荐登录名后缀随机数取值范围 - random_number: 50000 - # 登录成功页面 - success_url: http://localhost:8104/success - -server: - port: 8517 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-item/src/main/resources/application-dev.yml b/xbin-store-service-item/src/main/resources/application-dev.yml new file mode 100644 index 0000000..dbda36b --- /dev/null +++ b/xbin-store-service-item/src/main/resources/application-dev.yml @@ -0,0 +1,83 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-item + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.item + protocol: + name: dubbo + port: 20884 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + item_info_profix: 'ITEM_INFO:' + suffix: + item_info_base_suffix: ':BASE' + item_info_desc_suffix: ':DESC' + + +# 静态页面生成目录 +static_html_path: /Volumes/HGST/IdeaProjects/xbin-store/xbin-store-service-item/item/ + +server: + port: 8514 diff --git a/xbin-store-service-item/src/main/resources/application.yml b/xbin-store-service-item/src/main/resources/application.yml index abd444d..caf4dfc 100644 --- a/xbin-store-service-item/src/main/resources/application.yml +++ b/xbin-store-service-item/src/main/resources/application.yml @@ -1,83 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-item - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.item - protocol: - name: dubbo - port: 20884 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - item_info_profix: 'ITEM_INFO:' - suffix: - item_info_base_suffix: ':BASE' - item_info_desc_suffix: ':DESC' - - -# 静态页面生成目录 -static_html_path: /Volumes/HGST/IdeaProjects/xbin-store/xbin-store-service-item/item/ - -server: - port: 8514 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-notify/src/main/resources/application-dev.yml b/xbin-store-service-notify/src/main/resources/application-dev.yml new file mode 100644 index 0000000..a40cbbf --- /dev/null +++ b/xbin-store-service-notify/src/main/resources/application-dev.yml @@ -0,0 +1,46 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-notify + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.notify + protocol: + name: dubbo + port: 20886 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 3600 + prefix: + # 号码登录次数前缀 + mobile_login_time: + key: 'MOBILE_LOGIN_TIME:' + expire_time: 3600 + # 号码code前缀 + mobile_login_code: + key: 'MOBILE_LOGIN_CODE:' + expire_time: 120 + +# Redis 一段时间允许发送几条短信 +mobile_number_ceiling: 3 + +server: + port: 8516 diff --git a/xbin-store-service-notify/src/main/resources/application.yml b/xbin-store-service-notify/src/main/resources/application.yml index 3103913..caf4dfc 100644 --- a/xbin-store-service-notify/src/main/resources/application.yml +++ b/xbin-store-service-notify/src/main/resources/application.yml @@ -1,46 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-notify - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.notify - protocol: - name: dubbo - port: 20886 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 3600 - prefix: - # 号码登录次数前缀 - mobile_login_time: - key: 'MOBILE_LOGIN_TIME:' - expire_time: 3600 - # 号码code前缀 - mobile_login_code: - key: 'MOBILE_LOGIN_CODE:' - expire_time: 120 - -# Redis 一段时间允许发送几条短信 -mobile_number_ceiling: 3 - -server: - port: 8516 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-order/src/main/resources/application-dev.yml b/xbin-store-service-order/src/main/resources/application-dev.yml new file mode 100644 index 0000000..f716b86 --- /dev/null +++ b/xbin-store-service-order/src/main/resources/application-dev.yml @@ -0,0 +1,78 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-order + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181?backup=192.168.237.111:2181 + annotation: + package: cn.binux.order + protocol: + name: dubbo + port: 20888 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 一天 + expire_time: 86400 + prefix: + cart_info_profix: 'CART_INFO:' + cart_order_info_profix: 'CART_ORDER_INFO:' + cart_order_index_profix: 'CART_ORDER_INDEX:' +server: + port: 8518 + diff --git a/xbin-store-service-order/src/main/resources/application.yml b/xbin-store-service-order/src/main/resources/application.yml index 7103dd3..caf4dfc 100644 --- a/xbin-store-service-order/src/main/resources/application.yml +++ b/xbin-store-service-order/src/main/resources/application.yml @@ -1,78 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-order - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.order - protocol: - name: dubbo - port: 20888 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 一天 - expire_time: 86400 - prefix: - cart_info_profix: 'CART_INFO:' - cart_order_info_profix: 'CART_ORDER_INFO:' - cart_order_index_profix: 'CART_ORDER_INDEX:' -server: - port: 8518 - +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-portal/src/main/resources/application-dev.yml b/xbin-store-service-portal/src/main/resources/application-dev.yml new file mode 100644 index 0000000..03a2dda --- /dev/null +++ b/xbin-store-service-portal/src/main/resources/application-dev.yml @@ -0,0 +1,78 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-protal + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.portal + protocol: + name: dubbo + port: 20883 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + # 首页大广告 + index_ad: INDEX_AD + +server: + port: 8513 diff --git a/xbin-store-service-portal/src/main/resources/application.yml b/xbin-store-service-portal/src/main/resources/application.yml index 0c53902..caf4dfc 100644 --- a/xbin-store-service-portal/src/main/resources/application.yml +++ b/xbin-store-service-portal/src/main/resources/application.yml @@ -1,80 +1,3 @@ - - -#DUBBOX -dubbox: - application: - name: xbin-store-service-protal - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.portal - protocol: - name: dubbo - port: 20883 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - # 首页大广告 - index_ad: INDEX_AD - -server: - port: 8513 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-redis/src/main/resources/application-dev.yml b/xbin-store-service-redis/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0026b9c --- /dev/null +++ b/xbin-store-service-redis/src/main/resources/application-dev.yml @@ -0,0 +1,34 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-redis + organization: dubbox + owner: binux + registry: + id: henna + protocol: zookeeper + address: zookeeper://192.168.237.128:2181?backup=192.168.237.111:2181 + annotation: + package: cn.binux.redis + protocol: + name: dubbo + port: 20881 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: true + address: 192.168.237.128:7070 + username: root + password: root + +# REDIS (RedisProperties) +redis: + cluster: false + single-host: 192.168.237.128 + single-port: 6379 + password: da diff --git a/xbin-store-service-redis/src/main/resources/application.yml b/xbin-store-service-redis/src/main/resources/application.yml index 79309af..caf4dfc 100644 --- a/xbin-store-service-redis/src/main/resources/application.yml +++ b/xbin-store-service-redis/src/main/resources/application.yml @@ -1,33 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-redis - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.redis - protocol: - name: dubbo - port: 20881 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -# REDIS (RedisProperties) -redis: - cluster: false - single-host: 192.168.125.133 - single-port: 6379 - password: +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-search/src/main/resources/application-dev.yml b/xbin-store-service-search/src/main/resources/application-dev.yml new file mode 100644 index 0000000..5b25772 --- /dev/null +++ b/xbin-store-service-search/src/main/resources/application-dev.yml @@ -0,0 +1,80 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-search + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.search + protocol: + name: dubbo + port: 20882 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:cn.binux.mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# SOLR +spring: + data: + solr: + host: http://192.168.125.131:8080/solr/collection1 +# zkHost: + repositories: + enabled: false + +server: + port: 8512 + + + diff --git a/xbin-store-service-search/src/main/resources/application.yml b/xbin-store-service-search/src/main/resources/application.yml index 88823ac..caf4dfc 100644 --- a/xbin-store-service-search/src/main/resources/application.yml +++ b/xbin-store-service-search/src/main/resources/application.yml @@ -1,80 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-search - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.search - protocol: - name: dubbo - port: 20882 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:cn.binux.mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# SOLR spring: - data: - solr: - host: http://192.168.125.131:8080/solr/collection1 -# zkHost: - repositories: - enabled: false - -server: - port: 8512 - - - + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-service-sso/src/main/resources/application-dev.yml b/xbin-store-service-sso/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0046bb7 --- /dev/null +++ b/xbin-store-service-sso/src/main/resources/application-dev.yml @@ -0,0 +1,94 @@ +#DUBBOX +dubbox: + application: + name: xbin-store-service-sso + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.sso + protocol: + name: dubbo + port: 20885 + host: 192.168.237.1 + timeout: 30000 + threadpool: fixed + threads: 500 + accepts: 1000 + serialization: kryo + optimizer: cn.binux.serial.SerializationOptimizerImpl + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +druid: + url: jdbc:mysql://192.168.237.128:3306/xbin_store?characterEncoding=utf-8 + driver-class: com.mysql.jdbc.Driver + username: da + password: 1993822 + initial-size: 1 + min-idle: 1 + max-active: 20 + test-on-borrow: true + max-wait: 60000 + time-between-eviction-runs-millis: 60000 + min-evictable-idle-time-millis: 300000 + validation-query: SELECT 1 FROM DUAL + test-While-Idle: true + test-on-return: false + pool-prepared-statements: false + max-pool-prepared-statement-per-connection-size: 20 + filters: stat,wall,log4j,config + connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=false + monitor: + enabled: false + druid-stat-view: /druid/* + druid-web-stat-filter: /* + allow: 219.230.50.107,127.0.0.1 + deny: 192.168.1.73 + login-username: admin + login-password: 123456 + exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' + reset-enable: false +mybatis: + type-aliases-package: cn.binux.pojo + mapper-locations: classpath:mapper/*.xml + + +pagehelper: + helperDialect: mysql + reasonable: true + supportMethodsArguments: true + params: count=countSql + +# Redis +redisKey: + # 缓存时间 默认半小时 + expire_time: 1800 + prefix: + # 用户登录信息前缀 + user_session: 'USER_SESSION:' + # 验证码Redis前缀 + verifycode: 'VERIFYCODE:' + # 号码code + mobile_login_code: 'MOBILE_LOGIN_CODE:' + +login: + # 验证名 + validation: + #登录名 + ispinengaged: isPinEngaged + #邮箱 + isemailengaged: isEmailEngaged + #手机 + ismobileengaged: isMobileEngaged + # 推荐登录名后缀随机数取值范围 + random_number: 50000 + # 登录成功页面 + success_url: http://localhost:8104/success +server: + port: 8515 diff --git a/xbin-store-service-sso/src/main/resources/application.yml b/xbin-store-service-sso/src/main/resources/application.yml index fec44f5..caf4dfc 100644 --- a/xbin-store-service-sso/src/main/resources/application.yml +++ b/xbin-store-service-sso/src/main/resources/application.yml @@ -1,94 +1,3 @@ -#DUBBOX -dubbox: - application: - name: xbin-store-service-sso - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.sso - protocol: - name: dubbo - port: 20885 - host: 192.168.125.1 - timeout: 30000 - threadpool: fixed - threads: 500 - accepts: 1000 - serialization: kryo - optimizer: cn.binux.serial.SerializationOptimizerImpl - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -druid: - url: jdbc:mysql://localhost:3306/xbin_store?characterEncoding=utf-8 - driver-class: com.mysql.jdbc.Driver - username: root - password: OZo+t9QET+ctzd5Esn9q0GJP5hXtWWIKEsX8c4/w6z4C4AnxrwpvySNgBS89XdazOavjXXZp0oeZtQ3P9lLGEA== - initial-size: 1 - min-idle: 1 - max-active: 20 - test-on-borrow: true - max-wait: 60000 - time-between-eviction-runs-millis: 60000 - min-evictable-idle-time-millis: 300000 - validation-query: SELECT 1 FROM DUAL - test-While-Idle: true - test-on-return: false - pool-prepared-statements: false - max-pool-prepared-statement-per-connection-size: 20 - filters: stat,wall,log4j,config - connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000;config.decrypt=true - monitor: - enabled: false - druid-stat-view: /druid/* - druid-web-stat-filter: /* - allow: 219.230.50.107,127.0.0.1 - deny: 192.168.1.73 - login-username: admin - login-password: 123456 - exclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*' - reset-enable: false -mybatis: - type-aliases-package: cn.binux.pojo - mapper-locations: classpath:mapper/*.xml - - -pagehelper: - helperDialect: mysql - reasonable: true - supportMethodsArguments: true - params: count=countSql - -# Redis -redisKey: - # 缓存时间 默认半小时 - expire_time: 1800 - prefix: - # 用户登录信息前缀 - user_session: 'USER_SESSION:' - # 验证码Redis前缀 - verifycode: 'VERIFYCODE:' - # 号码code - mobile_login_code: 'MOBILE_LOGIN_CODE:' - -login: - # 验证名 - validation: - #登录名 - ispinengaged: isPinEngaged - #邮箱 - isemailengaged: isEmailEngaged - #手机 - ismobileengaged: isMobileEngaged - # 推荐登录名后缀随机数取值范围 - random_number: 50000 - # 登录成功页面 - success_url: http://localhost:8104/success -server: - port: 8515 +spring: + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java index 0886a19..6da5069 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java @@ -73,18 +73,24 @@ public class CartController { cartInfos= cartService.getCartInfoListByCookiesId(cookieUUID); } - if (cartInfos.size() == 0) { + if (cartInfos==null || cartInfos.size() == 0) { model.addAttribute("cartInfos", null); return "cart"; } - int totalPrice = 0; + int totalPrice = 1; for (int i = 0; i < cartInfos.size(); i++) { CartInfo cartInfo = cartInfos.get(i); totalPrice += cartInfo.getSum(); } - +// CartInfo cartInfo=new CartInfo(); +// cartInfo.setName("测试"); +// cartInfo.setNum(1); +// cartInfo.setSize("1"); +// cartInfo.setPrice((long) 1); +// List cartInfos1=new ArrayList<>(); +// cartInfos1.add(cartInfo); model.addAttribute("cartInfos", cartInfos); model.addAttribute("totalPrice", totalPrice); diff --git a/xbin-store-web-cart/src/main/resources/application-dev.yml b/xbin-store-web-cart/src/main/resources/application-dev.yml new file mode 100644 index 0000000..e18293c --- /dev/null +++ b/xbin-store-web-cart/src/main/resources/application-dev.yml @@ -0,0 +1,40 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-cart + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.cart.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8107 + + +# swagger2 +swagger2.package: cn.binux.cart.controller + +# Redis +redisKey: + prefix: + # 用户登录信息前缀 + user_session: 'USER_SESSION:' \ No newline at end of file diff --git a/xbin-store-web-cart/src/main/resources/application.yml b/xbin-store-web-cart/src/main/resources/application.yml index c88c1c6..caf4dfc 100644 --- a/xbin-store-web-cart/src/main/resources/application.yml +++ b/xbin-store-web-cart/src/main/resources/application.yml @@ -1,40 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-cart - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.cart.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8107 - - -# swagger2 -swagger2.package: cn.binux.cart.controller - -# Redis -redisKey: - prefix: - # 用户登录信息前缀 - user_session: 'USER_SESSION:' \ No newline at end of file + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-cart/src/main/resources/templates/cart.html b/xbin-store-web-cart/src/main/resources/templates/cart.html index 0393567..a533d0c 100644 --- a/xbin-store-web-cart/src/main/resources/templates/cart.html +++ b/xbin-store-web-cart/src/main/resources/templates/cart.html @@ -399,7 +399,7 @@ 购物车内暂时没有商品 - + 去购物> diff --git a/xbin-store-web-item/src/main/resources/application-dev.yml b/xbin-store-web-item/src/main/resources/application-dev.yml new file mode 100644 index 0000000..0779966 --- /dev/null +++ b/xbin-store-web-item/src/main/resources/application-dev.yml @@ -0,0 +1,35 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-item + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.item.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8103 + + +# swagger2 +swagger2.package: cn.binux.item.controller + diff --git a/xbin-store-web-item/src/main/resources/application.yml b/xbin-store-web-item/src/main/resources/application.yml index 7b160d1..caf4dfc 100644 --- a/xbin-store-web-item/src/main/resources/application.yml +++ b/xbin-store-web-item/src/main/resources/application.yml @@ -1,35 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-item - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.item.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8103 - - -# swagger2 -swagger2.package: cn.binux.item.controller - + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java index 410e808..e20fef3 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java +++ b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java @@ -69,16 +69,16 @@ public class OrderController { cartInfos = cartService.getCartInfoListByCookiesId(cookieValue); - for (int i = 0; i < indexArray.length; i++) { - int index = Integer.parseInt(indexArray[i]); - CartInfo cartInfo = cartInfos.get(index); - - cartInfoList.add(cartInfo); - - totalPrices += cartInfo.getSum(); - //cartInfos.remove(index); - - } +// for (int i = 0; i < indexArray.length; i++) { +// int index = Integer.parseInt(indexArray[i]); +// CartInfo cartInfo = cartInfos.get(index); +// +// cartInfoList.add(cartInfo); +// +// totalPrices += cartInfo.getSum(); +// //cartInfos.remove(index); +// +// } } else { model.addAttribute("msg", "请先去购物!"); return "error"; @@ -94,6 +94,14 @@ public class OrderController { jedisClient.expire(key, REDIS_ORDER_EXPIRE_TIME); jedisClient.expire(key2, REDIS_ORDER_EXPIRE_TIME); + //Add by Btd + totalPrices=1; + CartInfo cartInfo=new CartInfo(); + cartInfo.setSize("a"); + cartInfo.setName("测试"); + cartInfo.setNum(1); + cartInfo.setPrice((long)1); + cartInfoList.add(cartInfo); model.addAttribute("totalPrices", totalPrices); model.addAttribute("orderId", orderId); model.addAttribute("cartInfos", cartInfoList); diff --git a/xbin-store-web-order/src/main/resources/application-dev.yml b/xbin-store-web-order/src/main/resources/application-dev.yml new file mode 100644 index 0000000..8b29d2c --- /dev/null +++ b/xbin-store-web-order/src/main/resources/application-dev.yml @@ -0,0 +1,47 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-order + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.order.controller,cn.binux.order.interceptor + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8108 + +# swagger2 +swagger2.package: cn.binux.order.controller + +# Redis +redisKey: + # 订单项缓存时间 默认20分钟 + expire_time: 1200 + prefix: + # Redis购物车商品信息前缀 + cart_order_info_profix: 'CART_ORDER_INFO:' + # Redis购物车索引信息前缀 + cart_order_index_profix: 'CART_ORDER_INDEX:' + + +#SSO 系统登录页面 +sso_login_page: 'http://localhost:8104/login.html' diff --git a/xbin-store-web-order/src/main/resources/application.yml b/xbin-store-web-order/src/main/resources/application.yml index d587a34..caf4dfc 100644 --- a/xbin-store-web-order/src/main/resources/application.yml +++ b/xbin-store-web-order/src/main/resources/application.yml @@ -1,47 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-order - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.order.controller,cn.binux.order.interceptor - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8108 - -# swagger2 -swagger2.package: cn.binux.order.controller - -# Redis -redisKey: - # 订单项缓存时间 默认20分钟 - expire_time: 1200 - prefix: - # Redis购物车商品信息前缀 - cart_order_info_profix: 'CART_ORDER_INFO:' - # Redis购物车索引信息前缀 - cart_order_index_profix: 'CART_ORDER_INDEX:' - - -#SSO 系统登录页面 -sso_login_page: 'http://localhost:8104/login.html' + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java b/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java index b006c24..5032d3e 100644 --- a/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java +++ b/xbin-store-web-portal/src/main/java/cn/binux/portal/controller/IndexController.java @@ -1,14 +1,22 @@ package cn.binux.portal.controller; import cn.binux.constant.Const; +import cn.binux.pojo.TbUser; import cn.binux.portal.service.PortalContentService; +import cn.binux.redis.service.JedisClient; +import cn.binux.utils.CookieUtils; +import cn.binux.utils.FastJsonConvert; import com.alibaba.dubbo.config.annotation.Reference; +import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + /** * Created by cynicism on 17/1/27. */ @@ -18,19 +26,39 @@ public class IndexController { @Reference(version = Const.XBIN_STORE_PORTAL_VERSION) private PortalContentService portalContentService; + @Reference(version = Const.XBIN_STORE_REDIS_VERSION) + private JedisClient jedisClient; + @Value("${big_ad_index}") private long Big_AD_INDEX; + @Value("${redisKey.prefix.user_session}") + private String USER_SESSION; @RequestMapping("/index") - public String index(Model model) { - + public String index(HttpServletRequest request, HttpServletResponse response,Model model) { + String cookieUUID = CookieUtils.getCookieValue(request, Const.CART_KEY); + String tokenLogin = CookieUtils.getCookieValue(request, Const.TOKEN_LOGIN); + TbUser user = null; + String userJson = null; + if (StringUtils.isNoneEmpty(tokenLogin)) { + try { + userJson = jedisClient.get(USER_SESSION + tokenLogin); + } catch (Exception e) { +// logger.error("Redis 错误", e); + } + if (StringUtils.isNoneEmpty(userJson)) { + user = FastJsonConvert.convertJSONToObject(userJson, TbUser.class); + } + model.addAttribute("user", user); + } else { + model.addAttribute("user", user); + } return "index"; } @RequestMapping("/index2") public String index2() { - return "index"; } @RequestMapping("/sideBar/popupLogin") diff --git a/xbin-store-web-portal/src/main/resources/application-dev.yml b/xbin-store-web-portal/src/main/resources/application-dev.yml new file mode 100644 index 0000000..8b0cbad --- /dev/null +++ b/xbin-store-web-portal/src/main/resources/application-dev.yml @@ -0,0 +1,43 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-portal + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.portal.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8101 + + +# swagger2 +swagger2.package: cn.binux.portal.controller + +# 广告Cid +big_ad_index: 1 + +# Redis +redisKey: + prefix: + # 用户登录信息前缀 + user_session: 'USER_SESSION:' diff --git a/xbin-store-web-portal/src/main/resources/application.yml b/xbin-store-web-portal/src/main/resources/application.yml index 7dbea9d..caf4dfc 100644 --- a/xbin-store-web-portal/src/main/resources/application.yml +++ b/xbin-store-web-portal/src/main/resources/application.yml @@ -1,39 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-portal - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.portal.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8101 - - -# swagger2 -swagger2.package: cn.binux.portal.controller - -# 广告Cid -big_ad_index: 1 - - + profiles: + active: dev \ No newline at end of file diff --git a/xbin-store-web-portal/src/main/resources/templates/index.html b/xbin-store-web-portal/src/main/resources/templates/index.html index 825acbc..b6b5b02 100644 --- a/xbin-store-web-portal/src/main/resources/templates/index.html +++ b/xbin-store-web-portal/src/main/resources/templates/index.html @@ -91,9 +91,65 @@ + <%if (user == null){%> 你好,请登录 免费注册 + <%}else{%> + + ◇ ${user.username} + + + + + 退出 + 您可享金牌特惠,开通PLUS> + + + < + + + + 免费试用 + + 自营运费补贴 + + 售后服务 + + 评价奖励 + + 会员特价 + + 生日礼包 + + 专享礼包 + + 装机服务 + + 贵宾专线 + + 运费券 + + + > + + + <%}%> 我的订单 diff --git a/xbin-store-web-sso/src/main/resources/application-dev.yml b/xbin-store-web-sso/src/main/resources/application-dev.yml new file mode 100644 index 0000000..98a8c68 --- /dev/null +++ b/xbin-store-web-sso/src/main/resources/application-dev.yml @@ -0,0 +1,49 @@ +#DUBBO +dubbox: + application: + name: xbin-store-web-sso + organization: dubbox + owner: binux + registry: + protocol: zookeeper + address: zookeeper://192.168.237.128:2181 + annotation: + package: cn.binux.sso.controller + monitor: + enabled: false + address: 192.168.125.1:6060 + username: admin + password: admin + +#配置模板想到classpath路径,后面须加上"/" +beetl: + templates-path: templates/ + config: + html-tag-flag: true +#配置模板的后缀,自动读取spring.mvc.view.suffix +spring: + mvc: + view: + suffix: .html + +server: + port: 8104 + + +# swagger2 +swagger2.package: cn.binux.sso.controller + +# Redis +redisKey: + # 缓存时间 + expire_time: 120 + prefix: + # 验证码Redis前缀 + verifycode: 'VERIFYCODE:' + +# 密码错误 +password_error: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\","_t":"_ntInoTX"})' +# 用户名不存在 +user_not_exist: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u5982\u9700\u6d77\u5916\u624b\u673a\u767b\u5f55\u8bf7\u6dfb\u52a0 \u56fd\u5bb6\u533a\u53f7","_t":"_ntqtNMt","countryTips":true})' +# 成功响应首页 +portal_path: '({"success":"http://localhost:8101/"})' \ No newline at end of file diff --git a/xbin-store-web-sso/src/main/resources/application.yml b/xbin-store-web-sso/src/main/resources/application.yml index a4ee66d..caf4dfc 100644 --- a/xbin-store-web-sso/src/main/resources/application.yml +++ b/xbin-store-web-sso/src/main/resources/application.yml @@ -1,49 +1,3 @@ -#DUBBO -dubbox: - application: - name: xbin-store-web-sso - organization: dubbox - owner: binux - registry: - protocol: zookeeper - address: 192.168.125.128:2181 - annotation: - package: cn.binux.sso.controller - monitor: - enabled: false - address: 192.168.125.1:6060 - username: admin - password: admin - -#配置模板想到classpath路径,后面须加上"/" -beetl: - templates-path: templates/ - config: - html-tag-flag: true -#配置模板的后缀,自动读取spring.mvc.view.suffix spring: - mvc: - view: - suffix: .html - -server: - port: 8104 - - -# swagger2 -swagger2.package: cn.binux.sso.controller - -# Redis -redisKey: - # 缓存时间 - expire_time: 120 - prefix: - # 验证码Redis前缀 - verifycode: 'VERIFYCODE:' - -# 密码错误 -password_error: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\","_t":"_ntInoTX"})' -# 用户名不存在 -user_not_exist: '({"pwd":"\u8d26\u6237\u540d\u4e0e\u5bc6\u7801\u4e0d\u5339\u914d\uff0c\u8bf7\u91cd\u65b0\u8f93\u5165\u5982\u9700\u6d77\u5916\u624b\u673a\u767b\u5f55\u8bf7\u6dfb\u52a0 \u56fd\u5bb6\u533a\u53f7","_t":"_ntqtNMt","countryTips":true})' -# 成功响应首页 -portal_path: '({"success":"http://localhost:8101/"})' \ No newline at end of file + profiles: + active: dev \ No newline at end of file -- Gitee From 2457cf2f1f5bdc6bdc581255913927087efceb5c Mon Sep 17 00:00:00 2001 From: da <1163925944@qq.com> Date: Wed, 3 Jan 2018 23:44:15 +0800 Subject: [PATCH 04/16] =?UTF-8?q?=E4=B8=BB=E9=A1=B5=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=95=86=E5=93=81=E4=BB=A5=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E3=80=82=20=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E3=80=81=E8=B4=AD=E7=89=A9=E8=BD=A6?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E3=80=81=E4=B8=8B=E5=8D=95=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xbin-store-service-cart/pom.xml | 44 +++++++++---------- .../order/service/impl/OrderServiceImpl.java | 17 +++++-- .../binux/XbinStoreWebAdminApplication.java | 4 +- .../binux/cart/controller/CartController.java | 10 +---- .../order/controller/OrderController.java | 5 ++- .../src/main/resources/templates/success.html | 42 +++++++++--------- .../src/main/resources/templates/index.html | 8 +++- .../binux/XbinStoreWebSearchApplication.java | 4 +- 8 files changed, 71 insertions(+), 63 deletions(-) diff --git a/xbin-store-service-cart/pom.xml b/xbin-store-service-cart/pom.xml index 09561b1..97f118b 100644 --- a/xbin-store-service-cart/pom.xml +++ b/xbin-store-service-cart/pom.xml @@ -77,28 +77,28 @@ - - - - - - - + + org.springframework.boot + spring-boot-maven-plugin + + ${start-class} + + - - - - - - - - - - - - - - + + com.spotify + docker-maven-plugin + + ${project.artifactId} + ${project.basedir}/docker + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + @@ -130,7 +130,7 @@ - + diff --git a/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java b/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java index 3d8a3ee..522bb8b 100644 --- a/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java +++ b/xbin-store-service-order/src/main/java/cn/binux/order/service/impl/OrderServiceImpl.java @@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.transaction.annotation.Transactional; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -61,14 +62,11 @@ public class OrderServiceImpl implements OrderService { @Override public XbinResult generateOrder(String userCookieValue, String cartCookieValue, Integer addrId, Integer noAnnoyance, Integer paymentType, String orderId, String shippingName) { - - XbinResult result = userService.token(userCookieValue, ""); if (result.getData() == null) { logger.error("用户没有登录!"); return XbinResult.build(400, "系统错误!"); } - String data = (String) result.getData(); TbUser user = FastJsonConvert.convertJSONToObject(data, TbUser.class); @@ -81,7 +79,6 @@ public class OrderServiceImpl implements OrderService { String key3 = CART_INFO_PROFIX + cartCookieValue; orderId = paymentType.toString() + orderId + userId; - final TbOrder order = new TbOrder(); //设置订单id order.setOrderId(orderId); @@ -132,6 +129,17 @@ public class OrderServiceImpl implements OrderService { logger.error("Redis 服务出错!", e); } +// //Add BY Btd +// System.out.println("............."); +// cartInfos =new ArrayList(); +// CartInfo cartInfo2=new CartInfo(); +// cartInfo2.setSize("a"); +// cartInfo2.setName("测试"); +// cartInfo2.setNum(1); +// cartInfo2.setId((long)Integer.parseInt(IDUtils.genOrderId().substring(1,5))); +// cartInfo2.setPrice((long)1); +// cartInfos.add(cartInfo2); + // 保存订单项️ if (cartInfos.size() > 0) { for (int i = 0; i < cartInfos.size(); i++) { @@ -149,6 +157,7 @@ public class OrderServiceImpl implements OrderService { orderItem.setTotalFee(cartInfo.getSum()); orderItem.setWeights(cartInfo.getWeight() + ""); // 记录日志 + System.out.println(orderItem.toString()); orderItemMapper.insert(orderItem); logger.info("保存订单项,订单:" + orderItem.toString()); diff --git a/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java b/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java index a074d4f..afad936 100644 --- a/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java +++ b/xbin-store-web-admin/src/main/java/cn/binux/XbinStoreWebAdminApplication.java @@ -1,13 +1,13 @@ package cn.binux; -import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; +//import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Configuration; @Configuration -@EnableApolloConfig +//@EnableApolloConfig @SpringBootApplication //@EnableWebMvc public class XbinStoreWebAdminApplication { diff --git a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java index 6da5069..a5484c4 100644 --- a/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java +++ b/xbin-store-web-cart/src/main/java/cn/binux/cart/controller/CartController.java @@ -84,13 +84,6 @@ public class CartController { CartInfo cartInfo = cartInfos.get(i); totalPrice += cartInfo.getSum(); } -// CartInfo cartInfo=new CartInfo(); -// cartInfo.setName("测试"); -// cartInfo.setNum(1); -// cartInfo.setSize("1"); -// cartInfo.setPrice((long) 1); -// List cartInfos1=new ArrayList<>(); -// cartInfos1.add(cartInfo); model.addAttribute("cartInfos", cartInfos); model.addAttribute("totalPrice", totalPrice); @@ -136,8 +129,9 @@ public class CartController { return "success"; } else { + System.err.println(" "+pid+" "+pcount+" "+cookieUUID); XbinResult result = cartService.addCart(pid, pcount, cookieUUID); - + System.err.println(result.getData().toString()); model.addAttribute("cartInfo", (CartInfo)result.getData()); return "success"; diff --git a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java index e20fef3..79c18a3 100644 --- a/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java +++ b/xbin-store-web-order/src/main/java/cn/binux/order/controller/OrderController.java @@ -80,8 +80,8 @@ public class OrderController { // // } } else { - model.addAttribute("msg", "请先去购物!"); - return "error"; +// model.addAttribute("msg", "请先去购物!"); +// return "error"; } String orderId = IDUtils.genOrderId(); @@ -134,6 +134,7 @@ public class OrderController { String cartCookieValue = CookieUtils.getCookieValue(request, Const.CART_KEY); String userCookieValue = CookieUtils.getCookieValue(request, Const.TOKEN_LOGIN); + System.out.println("Controller="+addrId+" "+noAnnoyance+" "+paymentType+" "+orderId); XbinResult result = orderService.generateOrder(userCookieValue,cartCookieValue,addrId, noAnnoyance, paymentType,orderId, shippingName); diff --git a/xbin-store-web-order/src/main/resources/templates/success.html b/xbin-store-web-order/src/main/resources/templates/success.html index 0c74f1f..30a1373 100644 --- a/xbin-store-web-order/src/main/resources/templates/success.html +++ b/xbin-store-web-order/src/main/resources/templates/success.html @@ -692,9 +692,9 @@ src="//misc.360buyimg.com/jdf/1.0.0/unit/??base/1.0.0/base.js,basePatch/1.0.0/basePatch.js"> - - - + + + @@ -758,7 +758,7 @@ } catch (e) { } - + -<iframe src="//www.googletagmanager.com/ns.html?id=GTM-T947SH" - height="0" width="0" style="display:none;visibility:hidden"></iframe> + + - - - - - 微信扫一扫分享到微信购物圈,与好友分享! - 好友购买你分享的商品,您们都将获得京豆奖励! - - - - 购物圈是什么? - 购物圈是微信好友购物的分享社区,在这里您可以和好友分享购物乐趣 - - - + + + + + + + + + + + + + + +
免费试用
自营运费补贴
售后服务
评价奖励
会员特价
生日礼包
专享礼包
装机服务
贵宾专线
运费券