Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
程序猿小郑
microservices-platform
提交
eecaf5bb
microservices-platform
项目概览
程序猿小郑
/
microservices-platform
与 Fork 源项目一致
Fork自
zlt2000 / microservices-platform
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
microservices-platform
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eecaf5bb
编写于
10月 04, 2019
作者:
zlt2000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update to spring-boot-2.1.8.RELEASE & spring-cloud-Greenwich.SR3
上级
cbfe49e4
变更
38
隐藏空白更改
内联
并排
Showing
38 changed file
with
93 addition
and
117 deletion
+93
-117
README.md
README.md
+4
-5
pom.xml
pom.xml
+28
-8
zlt-business/code-generator/src/main/resources/application.yml
...usiness/code-generator/src/main/resources/application.yml
+1
-1
zlt-business/file-center/src/main/resources/application.yml
zlt-business/file-center/src/main/resources/application.yml
+1
-1
zlt-business/search-center/search-server/src/main/java/com/central/admin/controller/IndexController.java
...in/java/com/central/admin/controller/IndexController.java
+4
-4
zlt-business/search-center/search-server/src/main/java/com/central/admin/service/impl/IndexServiceImpl.java
...java/com/central/admin/service/impl/IndexServiceImpl.java
+8
-2
zlt-business/search-center/search-server/src/main/java/com/central/search/service/impl/AggregationServiceImpl.java
...m/central/search/service/impl/AggregationServiceImpl.java
+1
-1
zlt-business/search-center/search-server/src/main/resources/application.yml
...h-center/search-server/src/main/resources/application.yml
+4
-1
zlt-business/user-center/src/main/resources/application.yml
zlt-business/user-center/src/main/resources/application.yml
+1
-1
zlt-commons/zlt-auth-client-spring-boot-starter/pom.xml
zlt-commons/zlt-auth-client-spring-boot-starter/pom.xml
+5
-0
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/annotation/EnableTokenStore.java
...om/central/oauth2/common/annotation/EnableTokenStore.java
+0
-21
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/config/TokenStoreConfig.java
...va/com/central/oauth2/common/config/TokenStoreConfig.java
+1
-0
zlt-config/src/main/resources/application-dev.properties
zlt-config/src/main/resources/application-dev.properties
+1
-1
zlt-config/src/main/resources/application-prod.properties
zlt-config/src/main/resources/application-prod.properties
+1
-1
zlt-config/src/main/resources/application-test.properties
zlt-config/src/main/resources/application-test.properties
+1
-1
zlt-config/src/main/resources/application.properties
zlt-config/src/main/resources/application.properties
+5
-1
zlt-demo/seata-demo/account-service/src/main/resources/application.yml
...a-demo/account-service/src/main/resources/application.yml
+1
-1
zlt-demo/seata-demo/order-service/src/main/resources/application.yml
...ata-demo/order-service/src/main/resources/application.yml
+1
-1
zlt-demo/seata-demo/storage-service/src/main/resources/application.yml
...a-demo/storage-service/src/main/resources/application.yml
+1
-1
zlt-demo/sharding-jdbc-demo/src/main/resources/application-master-slave.yml
...jdbc-demo/src/main/resources/application-master-slave.yml
+3
-3
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-databases.yml
...emo/src/main/resources/application-sharding-databases.yml
+2
-2
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-databases2.yml
...mo/src/main/resources/application-sharding-databases2.yml
+2
-2
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-databases3.yml
...mo/src/main/resources/application-sharding-databases3.yml
+3
-3
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-tables.yml
...c-demo/src/main/resources/application-sharding-tables.yml
+1
-1
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceBClient.java
...ain/java/org/txlcn/demo/common/spring/ServiceBClient.java
+1
-1
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceBFallback.java
...n/java/org/txlcn/demo/common/spring/ServiceBFallback.java
+0
-17
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceCClient.java
...ain/java/org/txlcn/demo/common/spring/ServiceCClient.java
+1
-1
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceCFallback.java
...n/java/org/txlcn/demo/common/spring/ServiceCFallback.java
+0
-19
zlt-demo/txlcn-demo/txlcn-demo-spring-service-a/src/main/resources/application.yml
...-demo-spring-service-a/src/main/resources/application.yml
+2
-2
zlt-demo/txlcn-demo/txlcn-demo-spring-service-b/src/main/resources/application.yml
...-demo-spring-service-b/src/main/resources/application.yml
+2
-2
zlt-demo/txlcn-demo/txlcn-demo-spring-service-c/src/main/resources/application.yml
...-demo-spring-service-c/src/main/resources/application.yml
+2
-2
zlt-gateway/zuul-gateway/src/main/java/com/central/gateway/config/ResourceServerConfiguration.java
...m/central/gateway/config/ResourceServerConfiguration.java
+0
-2
zlt-transaction/txlcn-tm/src/main/resources/application.properties
...action/txlcn-tm/src/main/resources/application.properties
+2
-2
zlt-uaa/src/main/java/com/central/oauth/config/AuthorizationServerConfig.java
...a/com/central/oauth/config/AuthorizationServerConfig.java
+0
-2
zlt-uaa/src/main/java/com/central/oauth/handler/OauthLogoutHandler.java
...in/java/com/central/oauth/handler/OauthLogoutHandler.java
+0
-1
zlt-uaa/src/main/resources/application.yml
zlt-uaa/src/main/resources/application.yml
+1
-1
zlt-web/back-web/src/main/resources/static/pages/search/index_manager.html
...src/main/resources/static/pages/search/index_manager.html
+1
-1
zlt-web/back-web/src/main/resources/static/pages/search/index_manager_view.html
...ain/resources/static/pages/search/index_manager_view.html
+1
-1
未找到文件。
README.md
浏览文件 @
eecaf5bb
...
...
@@ -2,13 +2,14 @@
<p
align=
"center"
>
<img
src=
'https://img.shields.io/badge/license-Apache%202-4EB1BA.svg'
alt=
'License'
/>
<img
src=
"https://img.shields.io/badge/Spring%20Boot-2.
0.9
.RELEASE-blue"
alt=
"Downloads"
/>
<img
src=
"https://img.shields.io/badge/Spring%20Cloud-
Finchley.SR4
-blue"
alt=
"Downloads"
/>
<img
src=
"https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2.
0
.0.RELEASE-blue"
alt=
"Downloads"
/>
<img
src=
"https://img.shields.io/badge/Spring%20Boot-2.
1.8
.RELEASE-blue"
alt=
"Downloads"
/>
<img
src=
"https://img.shields.io/badge/Spring%20Cloud-
Greenwich.SR3
-blue"
alt=
"Downloads"
/>
<img
src=
"https://img.shields.io/badge/Spring%20Cloud%20Alibaba-2.
1
.0.RELEASE-blue"
alt=
"Downloads"
/>
<img
src=
"https://img.shields.io/badge/Layui-EasyWeb-yellowgreen"
alt=
"Downloads"
/>
</p>
## 如果您觉得有帮助,请点右上角 "Star" 支持一下谢谢
[TOC]
...
...
@@ -37,8 +38,6 @@
*
注重代码规范,严格控制包依赖,每个工程基本都是最小依赖
*
非常适合学习和企业中使用
> 重构于开源项目OCP&cp:https://gitee.com/owenwangwen/open-capacity-platform
## 2. 项目总体架构图
...
...
pom.xml
浏览文件 @
eecaf5bb
...
...
@@ -41,11 +41,15 @@
<userAgent.version>
1.21
</userAgent.version>
<transmittable.version>
2.11.0
</transmittable.version>
<lettuce.version>
5.1.8.RELEASE
</lettuce.version>
<banner.versio>
1.0.2
</banner.versio>
<platform-bom>
Cairo-SR3
</platform-bom>
<spring-cloud-alibaba-dependencies.version>
2.0.0.RELEASE
</spring-cloud-alibaba-dependencies.version>
<spring-boot-dependencies.version>
2.0.9.RELEASE
</spring-boot-dependencies.version>
<spring-cloud-dependencies.version>
Finchley.SR4
</spring-cloud-dependencies.version>
<banner.version>
1.0.2
</banner.version>
<commons-beanutils.version>
1.9.4
</commons-beanutils.version>
<spring-social-security.version>
1.1.6.RELEASE
</spring-social-security.version>
<commons-io.version>
2.6
</commons-io.version>
<servlet-api.version>
4.0.1
</servlet-api.version>
<!--<platform-bom>Cairo-SR3</platform-bom>-->
<spring-cloud-alibaba-dependencies.version>
2.1.0.RELEASE
</spring-cloud-alibaba-dependencies.version>
<spring-boot-dependencies.version>
2.1.8.RELEASE
</spring-boot-dependencies.version>
<spring-cloud-dependencies.version>
Greenwich.SR3
</spring-cloud-dependencies.version>
<spring-boot-maven-plugin.version>
2.1.1.RELEASE
</spring-boot-maven-plugin.version>
<docker-maven-plugin.version>
1.2.0
</docker-maven-plugin.version>
<sonar.exclusions>
zlt-job/**/*, zlt-register/**/*, zlt-web/**/*
</sonar.exclusions>
...
...
@@ -69,6 +73,7 @@
<dependency>
<groupId>
commons-beanutils
</groupId>
<artifactId>
commons-beanutils
</artifactId>
<version>
${commons-beanutils.version}
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
...
...
@@ -313,7 +318,22 @@
<dependency>
<groupId>
com.nepxion
</groupId>
<artifactId>
banner
</artifactId>
<version>
${banner.versio}
</version>
<version>
${banner.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.social
</groupId>
<artifactId>
spring-social-security
</artifactId>
<version>
${spring-social-security.version}
</version>
</dependency>
<dependency>
<groupId>
commons-io
</groupId>
<artifactId>
commons-io
</artifactId>
<version>
${commons-io.version}
</version>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<version>
${servlet-api.version}
</version>
</dependency>
<dependency>
...
...
@@ -323,13 +343,13 @@
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<
!--<
dependency>
<groupId>io.spring.platform</groupId>
<artifactId>platform-bom</artifactId>
<version>${platform-bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependency>
-->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
...
...
zlt-business/code-generator/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/user-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
mybatis-plus
:
mapper-locations
:
classpath:/mapper/*Mapper.xml
...
...
zlt-business/file-center/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/file_center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
mybatis-plus
:
mapper-locations
:
classpath:/mapper/*Mapper.xml
...
...
zlt-business/search-center/search-server/src/main/java/com/central/admin/controller/IndexController.java
浏览文件 @
eecaf5bb
...
...
@@ -52,8 +52,8 @@ public class IndexController {
/**
* 索引明细
*/
@GetMapping
(
"/index
/{indexName}
"
)
public
Result
<
Map
<
String
,
Object
>>
showIndex
(
@PathVariable
String
indexName
)
{
@GetMapping
(
"/index"
)
public
Result
<
Map
<
String
,
Object
>>
showIndex
(
String
indexName
)
{
Map
<
String
,
Object
>
result
=
indexService
.
show
(
indexName
);
return
Result
.
succeed
(
result
);
}
...
...
@@ -61,8 +61,8 @@ public class IndexController {
/**
* 删除索引
*/
@DeleteMapping
(
"/index
/{indexName}
"
)
public
Result
deleteIndex
(
@PathVariable
String
indexName
)
{
@DeleteMapping
(
"/index"
)
public
Result
deleteIndex
(
String
indexName
)
{
indexService
.
delete
(
indexName
);
return
Result
.
succeed
(
"操作成功"
);
}
...
...
zlt-business/search-center/search-server/src/main/java/com/central/admin/service/impl/IndexServiceImpl.java
浏览文件 @
eecaf5bb
package
com.central.admin.service.impl
;
import
cn.hutool.core.util.StrUtil
;
import
com.alibaba.fastjson.JSONObject
;
import
com.carrotsearch.hppc.cursors.ObjectCursor
;
import
com.central.admin.model.IndexDto
;
import
com.central.admin.model.IndexVo
;
...
...
@@ -115,7 +116,12 @@ public class IndexServiceImpl implements IIndexService {
IndexMetaData
indexMetaData
=
stat
.
get
(
indexName
);
//获取settings数据
Map
<
String
,
String
>
settMap
=
indexMetaData
.
getSettings
().
getAsMap
();
String
settingsStr
=
indexMetaData
.
getSettings
().
toString
();
Object
settingsObj
=
null
;
if
(
StrUtil
.
isNotEmpty
(
settingsStr
))
{
settingsObj
=
JSONObject
.
parse
(
settingsStr
);
}
ImmutableOpenMap
<
String
,
MappingMetaData
>
mappOpenMap
=
indexMetaData
.
getMappings
();
ImmutableOpenMap
<
String
,
AliasMetaData
>
aliasesOpenMap
=
indexMetaData
.
getAliases
();
Map
<
String
,
Object
>
result
=
new
HashMap
<>(
1
);
...
...
@@ -123,7 +129,7 @@ public class IndexServiceImpl implements IIndexService {
Map
<
String
,
Object
>
mappMap
=
new
HashMap
<>(
mappOpenMap
.
size
());
Map
<
String
,
Object
>
aliasesMap
=
new
HashMap
<>(
aliasesOpenMap
.
size
());
indexMap
.
put
(
"aliases"
,
aliasesMap
);
indexMap
.
put
(
"settings"
,
sett
Map
);
indexMap
.
put
(
"settings"
,
sett
ingsObj
);
indexMap
.
put
(
"mappings"
,
mappMap
);
result
.
put
(
indexName
,
indexMap
);
//获取mappings数据
...
...
zlt-business/search-center/search-server/src/main/java/com/central/search/service/impl/AggregationServiceImpl.java
浏览文件 @
eecaf5bb
...
...
@@ -9,7 +9,7 @@ import org.elasticsearch.search.aggregations.Aggregations;
import
org.elasticsearch.search.aggregations.bucket.histogram.DateHistogramInterval
;
import
org.elasticsearch.search.aggregations.bucket.histogram.ExtendedBounds
;
import
org.elasticsearch.search.aggregations.bucket.histogram.InternalDateHistogram
;
import
org.elasticsearch.search.aggregations.bucket.range.
date.
InternalDateRange
;
import
org.elasticsearch.search.aggregations.bucket.range.InternalDateRange
;
import
org.elasticsearch.search.aggregations.bucket.terms.Terms
;
import
org.elasticsearch.search.aggregations.metrics.cardinality.Cardinality
;
import
org.joda.time.DateTime
;
...
...
zlt-business/search-center/search-server/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -2,7 +2,10 @@ spring:
data
:
elasticsearch
:
cluster-name
:
${zlt.elasticsearch.cluster-name}
cluster-nodes
:
${zlt.elasticsearch.cluster-nodes}
cluster-nodes
:
${zlt.elasticsearch.cluster-nodes}:9300
elasticsearch
:
rest
:
uris
:
${zlt.elasticsearch.cluster-nodes}:9200
zlt
:
indices
:
...
...
zlt-business/user-center/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/user-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
mybatis-plus
:
mapper-locations
:
classpath:/mapper/*Mapper.xml
...
...
zlt-commons/zlt-auth-client-spring-boot-starter/pom.xml
浏览文件 @
eecaf5bb
...
...
@@ -40,5 +40,10 @@
<artifactId>
spring-boot-configuration-processor
</artifactId>
<optional>
true
</optional>
</dependency>
<dependency>
<groupId>
javax.servlet
</groupId>
<artifactId>
javax.servlet-api
</artifactId>
<scope>
provided
</scope>
</dependency>
</dependencies>
</project>
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/annotation/EnableTokenStore.java
已删除
100644 → 0
浏览文件 @
cbfe49e4
package
com.central.oauth2.common.annotation
;
import
com.central.oauth2.common.config.TokenStoreConfig
;
import
org.springframework.context.annotation.Import
;
import
java.lang.annotation.ElementType
;
import
java.lang.annotation.Retention
;
import
java.lang.annotation.RetentionPolicy
;
import
java.lang.annotation.Target
;
/**
* 开启token存储认证配置化
*
* @author zlt
* @date 2019/7/7
*/
@Target
(
ElementType
.
TYPE
)
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Import
(
TokenStoreConfig
.
class
)
public
@interface
EnableTokenStore
{
}
zlt-commons/zlt-auth-client-spring-boot-starter/src/main/java/com/central/oauth2/common/config/TokenStoreConfig.java
浏览文件 @
eecaf5bb
...
...
@@ -10,6 +10,7 @@ import org.springframework.context.annotation.Import;
*
* @author zlt
*/
@Configuration
public
class
TokenStoreConfig
{
@Configuration
@ConditionalOnProperty
(
prefix
=
"zlt.oauth2.token.store"
,
name
=
"type"
,
havingValue
=
"db"
)
...
...
zlt-config/src/main/resources/application-dev.properties
浏览文件 @
eecaf5bb
...
...
@@ -11,7 +11,7 @@ spring.redis.timeout=5000
##### elasticsearch配置
zlt.elasticsearch.cluster-name
=
my-es
zlt.elasticsearch.cluster-nodes
=
1
92.168.28.130:930
0
zlt.elasticsearch.cluster-nodes
=
1
19.3.105.18
0
##### sentinel配置
zlt.sentinel.dashboard
=
192.168.28.130:6999
...
...
zlt-config/src/main/resources/application-prod.properties
浏览文件 @
eecaf5bb
...
...
@@ -11,7 +11,7 @@ spring.redis.password=1q2w3e4r
##### elasticsearch配置
zlt.elasticsearch.cluster-name
=
my-es
zlt.elasticsearch.cluster-nodes
=
192.168.28.130
:9300
zlt.elasticsearch.cluster-nodes
=
192.168.28.130
##### sentinel配置
zlt.sentinel.dashboard
=
192.168.28.130:6999
...
...
zlt-config/src/main/resources/application-test.properties
浏览文件 @
eecaf5bb
...
...
@@ -11,7 +11,7 @@ spring.redis.timeout=5000
##### elasticsearch配置
zlt.elasticsearch.cluster-name
=
my-es
zlt.elasticsearch.cluster-nodes
=
192.168.28.130
:9300
zlt.elasticsearch.cluster-nodes
=
192.168.28.130
##### sentinel配置
zlt.sentinel.dashboard
=
192.168.28.130:6999
...
...
zlt-config/src/main/resources/application.properties
浏览文件 @
eecaf5bb
...
...
@@ -102,4 +102,8 @@ spring.redis.lettuce.pool.max-wait=-1
# 连接池中的最大空闲连接
spring.redis.lettuce.pool.max-idle
=
8
# 连接池中的最小空闲连接
spring.redis.lettuce.pool.min-idle
=
0
\ No newline at end of file
spring.redis.lettuce.pool.min-idle
=
0
##### 允许bean覆盖
spring.main.allow-bean-definition-overriding
=
true
\ No newline at end of file
zlt-demo/seata-demo/account-service/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://192.168.28.130:3306/seata-demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
root
password
:
1q2w3e4r
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
cloud
:
alibaba
:
seata
:
...
...
zlt-demo/seata-demo/order-service/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://192.168.28.130:3306/seata-demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
root
password
:
1q2w3e4r
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
cloud
:
alibaba
:
seata
:
...
...
zlt-demo/seata-demo/storage-service/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://192.168.28.130:3306/seata-demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
root
password
:
1q2w3e4r
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
cloud
:
alibaba
:
seata
:
...
...
zlt-demo/sharding-jdbc-demo/src/main/resources/application-master-slave.yml
浏览文件 @
eecaf5bb
...
...
@@ -4,19 +4,19 @@ sharding:
names
:
ds-master,ds-slave-0,ds-slave-1
ds-master
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_master?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
ds-slave-0
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_slave_0?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
ds-slave-1
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_slave_1?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-databases.yml
浏览文件 @
eecaf5bb
...
...
@@ -4,13 +4,13 @@ sharding:
names
:
ds-0,ds-1
ds-0
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_0?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
ds-1
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_1?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-databases2.yml
浏览文件 @
eecaf5bb
...
...
@@ -4,13 +4,13 @@ sharding:
names
:
ds-alibaba,ds-baidu
ds-alibaba
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_alibaba?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
ds-baidu
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_baidu?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-databases3.yml
浏览文件 @
eecaf5bb
...
...
@@ -4,19 +4,19 @@ sharding:
names
:
ds,ds-0,ds-1
ds
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
ds-0
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_0?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
ds-1
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds_1?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
zlt-demo/sharding-jdbc-demo/src/main/resources/application-sharding-tables.yml
浏览文件 @
eecaf5bb
...
...
@@ -4,7 +4,7 @@ sharding:
names
:
ds
ds
:
type
:
com.alibaba.druid.pool.DruidDataSource
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/demo_ds?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceBClient.java
浏览文件 @
eecaf5bb
...
...
@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
*
* @author ujued
*/
@FeignClient
(
value
=
"txlcn-demo-spring-service-b"
,
fallback
=
ServiceBFallback
.
class
)
@FeignClient
(
value
=
"txlcn-demo-spring-service-b"
)
public
interface
ServiceBClient
{
@GetMapping
(
"/rpc"
)
...
...
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceBFallback.java
已删除
100644 → 0
浏览文件 @
cbfe49e4
package
org.txlcn.demo.common.spring
;
import
org.springframework.stereotype.Component
;
/**
* Description:
* Date: 19-2-19 下午1:53
*
* @author ujued
*/
@Component
public
class
ServiceBFallback
implements
ServiceBClient
{
@Override
public
String
rpc
(
String
name
)
{
return
"fallback"
;
}
}
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceCClient.java
浏览文件 @
eecaf5bb
...
...
@@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam;
*
* @author ujued
*/
@FeignClient
(
value
=
"txlcn-demo-spring-service-c"
,
fallback
=
ServiceCFallback
.
class
)
@FeignClient
(
value
=
"txlcn-demo-spring-service-c"
)
public
interface
ServiceCClient
{
@GetMapping
(
"/rpc"
)
...
...
zlt-demo/txlcn-demo/txlcn-demo-common/src/main/java/org/txlcn/demo/common/spring/ServiceCFallback.java
已删除
100644 → 0
浏览文件 @
cbfe49e4
package
org.txlcn.demo.common.spring
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.stereotype.Component
;
/**
* Description:
* Date: 19-2-19 下午1:53
*
* @author ujued
*/
@Component
@Slf4j
public
class
ServiceCFallback
implements
ServiceCClient
{
@Override
public
String
rpc
(
String
name
)
{
return
"fallback"
;
}
}
zlt-demo/txlcn-demo/txlcn-demo-spring-service-a/src/main/resources/application.yml
浏览文件 @
eecaf5bb
spring
:
datasource
:
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/txlcn-demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
@@ -13,7 +13,7 @@ tx-lcn:
enabled
:
true
logger
:
enabled
:
true
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
jdbc-url
:
jdbc:mysql://${zlt.datasource.ip}:3306/tx_logger?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
\ No newline at end of file
zlt-demo/txlcn-demo/txlcn-demo-spring-service-b/src/main/resources/application.yml
浏览文件 @
eecaf5bb
spring
:
datasource
:
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/txlcn-demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
@@ -13,7 +13,7 @@ tx-lcn:
enabled
:
true
logger
:
enabled
:
true
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
jdbc-url
:
jdbc:mysql://${zlt.datasource.ip}:3306/tx_logger?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
\ No newline at end of file
zlt-demo/txlcn-demo/txlcn-demo-spring-service-c/src/main/resources/application.yml
浏览文件 @
eecaf5bb
spring
:
datasource
:
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/txlcn-demo?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
...
...
@@ -13,7 +13,7 @@ tx-lcn:
enabled
:
true
logger
:
enabled
:
true
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
jdbc-url
:
jdbc:mysql://${zlt.datasource.ip}:3306/tx_logger?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
\ No newline at end of file
zlt-gateway/zuul-gateway/src/main/java/com/central/gateway/config/ResourceServerConfiguration.java
浏览文件 @
eecaf5bb
package
com.central.gateway.config
;
import
com.central.common.config.DefaultPasswordConfig
;
import
com.central.oauth2.common.annotation.EnableTokenStore
;
import
com.central.oauth2.common.config.DefaultResourceServerConf
;
import
com.central.oauth2.common.properties.SecurityProperties
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -19,7 +18,6 @@ import org.springframework.security.oauth2.config.annotation.web.configuration.E
@Configuration
@EnableResourceServer
@EnableConfigurationProperties
(
SecurityProperties
.
class
)
@EnableTokenStore
@Import
({
DefaultPasswordConfig
.
class
})
public
class
ResourceServerConfiguration
extends
DefaultResourceServerConf
{
@Autowired
...
...
zlt-transaction/txlcn-tm/src/main/resources/application.properties
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@
#################
spring.profiles.active
=
dev
spring.datasource.driver-class-name
=
com.mysql.jdbc.Driver
spring.datasource.driver-class-name
=
com.mysql.
cj.
jdbc.Driver
spring.datasource.url
=
jdbc:mysql://${zlt.datasource.ip}:3306/tx-manager?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
spring.datasource.username
=
${zlt.datasource.username}
spring.datasource.password
=
${zlt.datasource.password}
...
...
@@ -11,7 +11,7 @@ spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect
spring.jpa.hibernate.ddl-auto
=
update
tx-lcn.logger.enabled
=
true
tx-lcn.logger.driver-class-name
=
com.mysql.jdbc.Driver
tx-lcn.logger.driver-class-name
=
com.mysql.
cj.
jdbc.Driver
tx-lcn.logger.jdbc-url
=
jdbc:mysql://${zlt.datasource.ip}:3306/tx_logger?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
tx-lcn.logger.username
=
${zlt.datasource.username}
tx-lcn.logger.password
=
${zlt.datasource.password}
...
...
zlt-uaa/src/main/java/com/central/oauth/config/AuthorizationServerConfig.java
浏览文件 @
eecaf5bb
package
com.central.oauth.config
;
import
com.central.oauth.service.impl.RedisClientDetailsService
;
import
com.central.oauth2.common.annotation.EnableTokenStore
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.AutoConfigureAfter
;
import
org.springframework.context.annotation.Configuration
;
...
...
@@ -30,7 +29,6 @@ import java.util.Arrays;
*/
@Configuration
@EnableAuthorizationServer
@EnableTokenStore
@AutoConfigureAfter
(
AuthorizationServerEndpointsConfigurer
.
class
)
public
class
AuthorizationServerConfig
extends
AuthorizationServerConfigurerAdapter
{
/**
...
...
zlt-uaa/src/main/java/com/central/oauth/handler/OauthLogoutHandler.java
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,6 @@ package com.central.oauth.handler;
import
cn.hutool.core.util.StrUtil
;
import
com.central.oauth2.common.util.AuthUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.oauth2.common.OAuth2AccessToken
;
...
...
zlt-uaa/src/main/resources/application.yml
浏览文件 @
eecaf5bb
...
...
@@ -3,7 +3,7 @@ spring:
url
:
jdbc:mysql://${zlt.datasource.ip}:3306/oauth-center?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false&zeroDateTimeBehavior=convertToNull
username
:
${zlt.datasource.username}
password
:
${zlt.datasource.password}
driver-class-name
:
com.mysql.jdbc.Driver
driver-class-name
:
com.mysql.
cj.
jdbc.Driver
mybatis-plus
:
mapper-locations
:
classpath:/mapper/*Mapper.xml
...
...
zlt-web/back-web/src/main/resources/static/pages/search/index_manager.html
浏览文件 @
eecaf5bb
...
...
@@ -99,7 +99,7 @@
layer
.
confirm
(
'
确定要删除吗?
'
,
function
(
i
)
{
layer
.
close
(
i
);
layer
.
load
(
2
);
admin
.
req
(
'
api-search/admin/index
/
'
+
obj
.
data
.
indexName
,
{},
function
(
data
)
{
admin
.
req
(
'
api-search/admin/index
?indexName=
'
+
obj
.
data
.
indexName
,
{},
function
(
data
)
{
layer
.
closeAll
(
'
loading
'
);
if
(
data
.
resp_code
==
0
)
{
layer
.
msg
(
data
.
resp_msg
,
{
icon
:
1
,
time
:
500
});
...
...
zlt-web/back-web/src/main/resources/static/pages/search/index_manager_view.html
浏览文件 @
eecaf5bb
...
...
@@ -21,7 +21,7 @@
// 回显user数据
let
indexName
=
admin
.
getTempData
(
'
indexName
'
);
if
(
indexName
)
{
admin
.
req
(
'
api-search/admin/index
/
'
+
indexName
,
{
},
function
(
data
)
{
admin
.
req
(
'
api-search/admin/index
'
,
{
'
indexName
'
:
indexName
},
function
(
data
)
{
layer
.
closeAll
(
'
loading
'
);
if
(
0
==
data
.
resp_code
)
{
$
(
'
#data
'
).
html
(
syntaxHighlight
(
data
.
datas
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录