Merge remote-tracking branch 'origin/leng_dev' into leng_dev
This commit is contained in:
commit
f68a0fa655
357 files changed
+54570
-3442
No files matched your search
@@ -32,10 +32,15 @@
|
||||
<description>工作流管理模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--common code -->
|
||||
<dependency>
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
|
||||
OAuth2Authentication auth2Authentication = tokenService.loadAuthentication(tokens.split(" ")[1]);
|
||||
if (ObjectUtil.isNotNull(auth2Authentication)) {
|
||||
SecurityContextHolder.getContext().setAuthentication(auth2Authentication);
|
||||
accessor.setUser(() -> (String) auth2Authentication.getPrincipal());
|
||||
accessor.setUser(() -> auth2Authentication.getName());
|
||||
return message;
|
||||
} else {
|
||||
return null;
|
||||
|
||||
@@ -4,23 +4,13 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
# 配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
|
||||
active: dev
|
||||
@@ -48,7 +48,7 @@
|
||||
data-drag="true"
|
||||
jqyoui-draggable="{onStart:'startDragCallback', onDrag:'dragCallback'}"
|
||||
data-jqyoui-options="{revert: 'invalid', helper: 'clone', opacity : 0.5}">
|
||||
|
||||
|
||||
<img ng-src="editor-app/stencilsets/bpmn2.0/icons/{{item.icon}}" width="16px;" height="16px;"/>
|
||||
{{item.name}}
|
||||
</li>
|
||||
@@ -57,21 +57,21 @@
|
||||
</div>
|
||||
</div>
|
||||
<div id="canvasHelpWrapper" class="col-xs-9">
|
||||
<div class="canvas-wrapper" id="canvasSection"
|
||||
<div class="canvas-wrapper" id="canvasSection"
|
||||
ng-model="droppedElement"
|
||||
ng-model="droppedElement"
|
||||
data-drop="true"
|
||||
data-jqyoui-options
|
||||
jqyoui-droppable="{onDrop:'dropCallback',onOver: 'overCallback', onOut: 'outCallback'}">
|
||||
jqyoui-droppable="{onDrop:'dropCallback',onOver: 'overCallback', onOut: 'outCallback'}">
|
||||
<div class="canvas-message" id="model-modified-date"></div>
|
||||
<div class="Oryx_button"
|
||||
id="delete-button"
|
||||
<div class="Oryx_button"
|
||||
id="delete-button"
|
||||
title="{{'BUTTON.ACTION.DELETE.TOOLTIP' | translate}}"
|
||||
ng-click="deleteShape()"
|
||||
style="display:none">
|
||||
<img src="editor-app/images/delete.png"/>
|
||||
</div>
|
||||
<div class="Oryx_button"
|
||||
<div class="Oryx_button"
|
||||
id="morph-button"
|
||||
title="{{'BUTTON.ACTION.MORPH.TOOLTIP' | translate}}"
|
||||
ng-click="morphShape()"
|
||||
@@ -104,9 +104,9 @@
|
||||
<strong>{{'ELEMENT.AUTHOR' | translate}}: </strong> {{selectedItem.auditData.author}}
|
||||
</div>
|
||||
<div class="selected-item-title">
|
||||
<a ng-click="propertyWindowState.toggle()">
|
||||
<a ng-click="propertyWindowState.toggle()">
|
||||
<i class="glyphicon" ng-class="{'glyphicon-chevron-right': propertyWindowState.collapsed, 'glyphicon-chevron-down': !propertyWindowState.collapsed}"></i>
|
||||
<span ng-show="selectedItem.title != undefined && selectedItem.title != null && selectedItem.title.length > 0">{{selectedItem.title}}</span>
|
||||
<span ng-show="selectedItem.title != undefined && selectedItem.title != null && selectedItem.title.length > 0">{{selectedItem.title}}</span>
|
||||
<span ng-show="!selectedItem || selectedItem.title == undefined || selectedItem.title == null || selectedItem.title.length == 0">{{modelData.name}}</span>
|
||||
</a>
|
||||
</div>
|
||||
@@ -117,7 +117,7 @@
|
||||
ng-click="propertyClicked($index)" ng-class="{'clear' : $index%2 == 0}">
|
||||
<span class="title" ng-if="!property.hidden">{{ property.title }} :</span>
|
||||
<span class="title-removed" ng-if="property.hidden"><i>{{ property.title }} ({{'PROPERTY.REMOVED' | translate}}) :</i></span>
|
||||
<span class="value">
|
||||
<span class="value">
|
||||
<ng-include
|
||||
src="getPropertyTemplateUrl($index)" ng-if="!property.hasReadWriteMode"></ng-include>
|
||||
<ng-include src="getPropertyReadModeTemplateUrl($index)"
|
||||
@@ -128,8 +128,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -15,10 +15,15 @@
|
||||
<description>代码生成模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--数据操作-->
|
||||
<dependency>
|
||||
|
||||
+7
-7
@@ -1,7 +1,7 @@
|
||||
package com.pig4cloud.pigx.codegen.config;
|
||||
|
||||
import com.mysql.cj.jdbc.Driver;
|
||||
import com.pig4cloud.pigx.codegen.util.DataSourceConstant;
|
||||
import com.pig4cloud.pigx.codegen.util.DataSourceConstants;
|
||||
import com.zaxxer.hikari.HikariDataSource;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -60,18 +60,18 @@ public class DynamicDataSourceConfig implements TransactionManagementConfigurer
|
||||
dds.setUsername(dataSourceProperties.getUsername());
|
||||
dds.setPassword(dataSourceProperties.getPassword());
|
||||
|
||||
List<Map<String, Object>> dbList = new JdbcTemplate(dds).queryForList(DataSourceConstant.QUERY_DS_SQL);
|
||||
List<Map<String, Object>> dbList = new JdbcTemplate(dds).queryForList(DataSourceConstants.QUERY_DS_SQL);
|
||||
log.info("开始 -> 初始化动态数据源");
|
||||
Optional.of(dbList).ifPresent(list -> list.forEach(db -> {
|
||||
log.info("数据源:{}", db.get(DataSourceConstant.DS_NAME));
|
||||
log.info("数据源:{}", db.get(DataSourceConstants.DS_NAME));
|
||||
HikariDataSource ds = new HikariDataSource();
|
||||
ds.setJdbcUrl(String.valueOf(db.get(DataSourceConstant.DS_JDBC_URL)));
|
||||
ds.setJdbcUrl(String.valueOf(db.get(DataSourceConstants.DS_JDBC_URL)));
|
||||
ds.setDriverClassName(Driver.class.getName());
|
||||
ds.setUsername((String) db.get(DataSourceConstant.DS_USER_NAME));
|
||||
ds.setUsername((String) db.get(DataSourceConstants.DS_USER_NAME));
|
||||
|
||||
String decPwd = stringEncryptor.decrypt((String) db.get(DataSourceConstant.DS_USER_PWD));
|
||||
String decPwd = stringEncryptor.decrypt((String) db.get(DataSourceConstants.DS_USER_PWD));
|
||||
ds.setPassword(decPwd);
|
||||
dataSourceMap.put(db.get(DataSourceConstant.DS_ROUTE_KEY), ds);
|
||||
dataSourceMap.put(db.get(DataSourceConstants.DS_ROUTE_KEY), ds);
|
||||
}));
|
||||
|
||||
log.info("完毕 -> 初始化动态数据源,共计 {} 条", dataSourceMap.size());
|
||||
|
||||
-2
@@ -21,7 +21,6 @@ import cn.hutool.core.io.IoUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.pig4cloud.pigx.codegen.entity.GenConfig;
|
||||
import com.pig4cloud.pigx.codegen.mapper.SysDatasourceConfMapper;
|
||||
import com.pig4cloud.pigx.codegen.mapper.SysGeneratorMapper;
|
||||
import com.pig4cloud.pigx.codegen.service.SysGeneratorService;
|
||||
import com.pig4cloud.pigx.codegen.util.DynamicDataSourceContextHolder;
|
||||
@@ -43,7 +42,6 @@ import java.util.zip.ZipOutputStream;
|
||||
@Service
|
||||
@AllArgsConstructor
|
||||
public class SysGeneratorServiceImpl implements SysGeneratorService {
|
||||
private final SysDatasourceConfMapper sysDatasourceConfMapper;
|
||||
private final SysGeneratorMapper sysGeneratorMapper;
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ package com.pig4cloud.pigx.codegen.util;
|
||||
* <p>
|
||||
* 数据源相关常量
|
||||
*/
|
||||
public interface DataSourceConstant {
|
||||
public interface DataSourceConstants {
|
||||
/**
|
||||
* 查询数据源的SQL
|
||||
*/
|
||||
@@ -4,22 +4,13 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
active: dev
|
||||
@@ -145,7 +145,7 @@
|
||||
* 搜索回调
|
||||
*/
|
||||
searchChange(form) {
|
||||
this.getList(this.page, form)
|
||||
this.getList(this.page, this.filterForm(form))
|
||||
},
|
||||
/**
|
||||
* 刷新回调
|
||||
|
||||
@@ -32,10 +32,15 @@
|
||||
<description>基于elastic-job后台跑批定时任务模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--跑批任务-->
|
||||
<dependency>
|
||||
|
||||
@@ -4,22 +4,13 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
active: dev
|
||||
@@ -15,10 +15,15 @@
|
||||
<description>基于quartz后台跑批定时任务模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--日志处理-->
|
||||
<dependency>
|
||||
|
||||
+5
-5
@@ -123,20 +123,20 @@ public class SysJobController {
|
||||
/**
|
||||
* 通过id删除定时任务
|
||||
*
|
||||
* @param jobId id
|
||||
* @param id id
|
||||
* @return R
|
||||
*/
|
||||
@SysLog("删除定时任务")
|
||||
@DeleteMapping("/{id}")
|
||||
@PreAuthorize("@pms.hasPermission('job_sys_job_del')")
|
||||
@ApiOperation(value = "唯一标识查询定时任务,暂停任务才能删除")
|
||||
public R removeById(@PathVariable Integer jobId) {
|
||||
SysJob querySysJob = this.sysJobService.getById(jobId);
|
||||
public R removeById(@PathVariable Integer id) {
|
||||
SysJob querySysJob = this.sysJobService.getById(id);
|
||||
if (JOB_STATUS_NOT_RUNNING.getType().equals(querySysJob.getJobStatus())) {
|
||||
this.taskUtil.removeJob(querySysJob, scheduler);
|
||||
this.sysJobService.removeById(jobId);
|
||||
this.sysJobService.removeById(id);
|
||||
} else if (JOB_STATUS_RELEASE.getType().equals(querySysJob.getJobStatus())) {
|
||||
this.sysJobService.removeById(jobId);
|
||||
this.sysJobService.removeById(id);
|
||||
}
|
||||
return R.builder().build();
|
||||
}
|
||||
|
||||
@@ -7,22 +7,13 @@ quartz:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
active: dev
|
||||
@@ -57,16 +57,27 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-turbine</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!--Redis-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
|
||||
</dependency>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--web 模块-->
|
||||
<dependency>
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@
|
||||
package com.pig4cloud.pigx.monitor.support;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.pig4cloud.pigx.common.core.constant.CommonConstants;
|
||||
import com.pig4cloud.pigx.common.core.constant.CacheConstants;
|
||||
import de.codecentric.boot.admin.server.domain.events.InstanceEvent;
|
||||
import de.codecentric.boot.admin.server.eventstore.InMemoryEventStore;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -51,7 +51,7 @@ public class RedisEventStore extends InMemoryEventStore {
|
||||
log.info("保存实例事件的KEY:{},EVENT: {}", key, event.getType());
|
||||
redisTemplate.setKeySerializer(new StringRedisSerializer());
|
||||
redisTemplate.setHashValueSerializer(new Jackson2JsonRedisSerializer<>(InstanceEvent.class));
|
||||
redisTemplate.opsForHash().put(CommonConstants.EVENT_KEY, key, event);
|
||||
redisTemplate.opsForHash().put(CacheConstants.EVENT_KEY, key, event);
|
||||
});
|
||||
return super.append(events);
|
||||
}
|
||||
|
||||
@@ -4,26 +4,18 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
turbine:
|
||||
app-config: pigx-upms,pigx-auth
|
||||
app-config: pigx-upms-biz,pigx-auth
|
||||
cluster-name-expression: new String("default")
|
||||
combine-host-port: true
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
This is the JRebel configuration file. It maps the running application to your IDE workspace, enabling JRebel reloading for this project.
|
||||
Refer to https://manuals.zeroturnaround.com/jrebel/standalone/config.html for more information.
|
||||
-->
|
||||
<application generated-by="intellij" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.zeroturnaround.com" xsi:schemaLocation="http://www.zeroturnaround.com http://update.zeroturnaround.com/jrebel/rebel-2_1.xsd">
|
||||
|
||||
<classpath>
|
||||
<dir name="/Users/lengleng/work/my/super/pigx/pigx-visual/pigx-mp-manager/target/classes">
|
||||
</dir>
|
||||
</classpath>
|
||||
|
||||
</application>
|
||||
@@ -15,10 +15,15 @@
|
||||
<description>微信公众号管理模块</description>
|
||||
|
||||
<dependencies>
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--数据操作-->
|
||||
<dependency>
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ package com.pig4cloud.pigx.mp.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
+6
@@ -8,6 +8,7 @@ import com.pig4cloud.pigx.mp.service.WxFansMsgService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import me.chanjar.weixin.common.api.WxConsts;
|
||||
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||
import me.chanjar.weixin.mp.api.WxMpService;
|
||||
import me.chanjar.weixin.mp.bean.message.WxMpXmlMessage;
|
||||
@@ -36,6 +37,11 @@ public class LogHandler extends AbstractHandler {
|
||||
WxSessionManager sessionManager) {
|
||||
log.debug("接收到请求消息,内容:{}", wxMessage.getContent());
|
||||
|
||||
if (!WxConsts.XmlMsgType.TEXT.equals(wxMessage.getMsgType())) {
|
||||
log.debug("消息类型其他类型不保存", wxMessage.getContent());
|
||||
return null;
|
||||
}
|
||||
|
||||
WxAccount wxAccount = wxAccountService.getOne(Wrappers.<WxAccount>lambdaQuery()
|
||||
.eq(WxAccount::getAccount, wxMessage.getToUser()));
|
||||
|
||||
|
||||
@@ -4,22 +4,13 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@pigx-eureka:8761/eureka/
|
||||
active: dev
|
||||
@@ -58,9 +58,6 @@
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<finalName>${project.name}</finalName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
@@ -18,10 +18,3 @@ security:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
# 注册中心
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
@@ -24,15 +24,15 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<!--eureka-->
|
||||
<!--注册中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
<!--LCN-->
|
||||
<dependency>
|
||||
|
||||
@@ -4,23 +4,13 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
nacos:
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
server-addr: ${NACOS-HOST:pigx-register}:${NACOS-PORT:8848}
|
||||
config:
|
||||
server-addr: ${spring.cloud.nacos.discovery.server-addr}
|
||||
file-extension: yml
|
||||
shared-dataids: application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
|
||||
active: dev
|
||||
@@ -1,15 +0,0 @@
|
||||
FROM anapsix/alpine-java:8_server-jre_unlimited
|
||||
|
||||
MAINTAINER wangiegie@gmail.com
|
||||
|
||||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
|
||||
RUN mkdir -p /pigx-zipkin
|
||||
|
||||
WORKDIR /pigx-zipkin
|
||||
|
||||
EXPOSE 5006
|
||||
|
||||
ADD ./pigx-visual/pigx-zipkin/target/pigx-zipkin.jar ./
|
||||
|
||||
CMD java -Djava.security.egd=file:/dev/./urandom -jar pigx-zipkin.jar
|
||||
@@ -1,104 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
~ Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
~
|
||||
~ Redistribution and use in source and binary forms, with or without
|
||||
~ modification, are permitted provided that the following conditions are met:
|
||||
~
|
||||
~ Redistributions of source code must retain the above copyright notice,
|
||||
~ this list of conditions and the following disclaimer.
|
||||
~ Redistributions in binary form must reproduce the above copyright
|
||||
~ notice, this list of conditions and the following disclaimer in the
|
||||
~ documentation and/or other materials provided with the distribution.
|
||||
~ Neither the name of the pig4cloud.com developer nor the names of its
|
||||
~ contributors may be used to endorse or promote products derived from
|
||||
~ this software without specific prior written permission.
|
||||
~ Author: lengleng (wangiegie@gmail.com)
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>pigx-visual</artifactId>
|
||||
<groupId>com.pig4cloud</groupId>
|
||||
<version>2.8.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>pigx-zipkin</artifactId>
|
||||
<description>pigx zipkin追踪服务</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-undertow</artifactId>
|
||||
</dependency>
|
||||
<!--配置中心客户端-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-config</artifactId>
|
||||
</dependency>
|
||||
<!--zipkin-->
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-server</artifactId>
|
||||
<version>${zipkin.version}</version>
|
||||
<!--排除log4j2 避免和logback冲突警告-->
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-log4j2</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-ui</artifactId>
|
||||
<version>${zipkin.version}</version>
|
||||
</dependency>
|
||||
<!-- 使用mysql存储-->
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-autoconfigure-storage-mysql</artifactId>
|
||||
<version>${zipkin.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.zipkin.java</groupId>
|
||||
<artifactId>zipkin-storage-mysql</artifactId>
|
||||
<version>${zipkin-storage-mysql.version}</version>
|
||||
</dependency>
|
||||
<!-- zipkin2.x 需要此包连接操作mysql -->
|
||||
<dependency>
|
||||
<groupId>org.jooq</groupId>
|
||||
<artifactId>jooq</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
</project>
|
||||
-46
@@ -1,46 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2018-2025, lengleng All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* Neither the name of the pig4cloud.com developer nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
* Author: lengleng (wangiegie@gmail.com)
|
||||
*/
|
||||
|
||||
package com.pig4cloud.pigx.zipkin;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.cloud.client.SpringCloudApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import zipkin.storage.mysql.MySQLStorage;
|
||||
import zipkin2.server.internal.EnableZipkinServer;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* @author 仙(๑ • ㅂ • ́)و✧酱
|
||||
* @date 2019/2/22
|
||||
* <p>
|
||||
* 服务链路追踪
|
||||
*/
|
||||
@EnableZipkinServer
|
||||
@SpringCloudApplication
|
||||
public class PigxZipkinApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PigxZipkinApplication.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public MySQLStorage mySQLStorage(DataSource datasource) {
|
||||
return MySQLStorage.builder().datasource(datasource).executor(Runnable::run).build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
${AnsiColor.BRIGHT_YELLOW}
|
||||
|
||||
::::::::: ::::::::::: :::::::: ::: :::
|
||||
:+: :+: :+: :+: :+: :+: :+:
|
||||
+:+ +:+ +:+ +:+ +:+ +:+
|
||||
+#++:++#+ +#+ :#: +#++:+
|
||||
+#+ +#+ +#+ +#+# +#+ +#+
|
||||
#+# #+# #+# #+# #+# #+#
|
||||
### ########### ######## ### ###
|
||||
|
||||
www.pig4cloud.com
|
||||
|
||||
Pig Microservice Architecture
|
||||
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
server:
|
||||
port: 5006
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: @artifactId@
|
||||
#配置中心
|
||||
cloud:
|
||||
config:
|
||||
fail-fast: true
|
||||
name: ${spring.application.name}
|
||||
profile: ${spring.profiles.active}
|
||||
discovery:
|
||||
enabled: true
|
||||
service-id: pigx-config
|
||||
profiles:
|
||||
active: dev
|
||||
|
||||
# 注册中心配置
|
||||
eureka:
|
||||
instance:
|
||||
prefer-ip-address: true
|
||||
client:
|
||||
service-url:
|
||||
defaultZone: http://pig:pig@${EUREKA-HOST:pigx-eureka}:${EUREKA-PORT:8761}/eureka/
|
||||
@@ -40,6 +40,5 @@
|
||||
<module>pigx-mp-manager</module>
|
||||
<module>pigx-sso-client-demo</module>
|
||||
<module>pigx-tx-manager</module>
|
||||
<module>pigx-zipkin</module>
|
||||
</modules>
|
||||
</project>
|
||||
Reference in new issue
Block a user