yaoq преди 2 години
родител
ревизия
d7aad13dcc
променени са 42 файла, в които са добавени 475 реда и са изтрити 461 реда
  1. +2
    -2
      smtweb-framework/bpm/pom.xml
  2. +3
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/BpmStartedListener.java
  3. +0
    -168
      smtweb-framework/canal/client/canal.example.iml
  4. +1
    -1
      smtweb-framework/canal/client/pom.xml
  5. +54
    -0
      smtweb-framework/canal/client/src/main/assembly/dev.xml
  6. +54
    -0
      smtweb-framework/canal/client/src/main/assembly/release.xml
  7. +15
    -0
      smtweb-framework/canal/client/src/main/bin/restart.sh
  8. +23
    -0
      smtweb-framework/canal/client/src/main/bin/startup.bat
  9. +105
    -0
      smtweb-framework/canal/client/src/main/bin/startup.sh
  10. +53
    -0
      smtweb-framework/canal/client/src/main/bin/stop.sh
  11. +13
    -0
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientApplication.java
  12. +21
    -0
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientConfiguration.java
  13. +1
    -1
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientConsts.java
  14. +4
    -4
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientInstance.java
  15. +14
    -0
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientLauncher.java
  16. +6
    -1
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientStartedListener.java
  17. +1
    -1
      smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientVO.java
  18. +2
    -0
      smtweb-framework/canal/client/src/main/resources/META-INF/spring.factories
  19. +5
    -5
      smtweb-framework/canal/client/src/main/resources/client.properties
  20. +0
    -198
      smtweb-framework/canal/server/canal.server.iml
  21. +13
    -18
      smtweb-framework/canal/server/pom.xml
  22. +2
    -2
      smtweb-framework/canal/server/src/main/bin/startup.bat
  23. +17
    -17
      smtweb-framework/canal/server/src/main/bin/startup.sh
  24. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalApplication.java
  25. +21
    -0
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalConfiguration.java
  26. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalConstants.java
  27. +6
    -6
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalController.java
  28. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalLauncher.java
  29. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalStartedListener.java
  30. +2
    -2
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalStarter.java
  31. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/InstanceConfig.java
  32. +7
    -7
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/admin/CanalAdminController.java
  33. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/InstanceAction.java
  34. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/InstanceConfigMonitor.java
  35. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/ManagerInstanceConfigMonitor.java
  36. +1
    -1
      smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/SpringInstanceConfigMonitor.java
  37. +2
    -0
      smtweb-framework/canal/server/src/main/resources/META-INF/spring.factories
  38. +9
    -7
      smtweb-framework/canal/server/src/main/resources/canal.properties
  39. +3
    -4
      smtweb-framework/canal/server/src/main/resources/example/instance.properties
  40. +2
    -2
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysServiceFactory.java
  41. +4
    -4
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysThreadPool.java
  42. +1
    -1
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysThreadWorker.java

+ 2
- 2
smtweb-framework/bpm/pom.xml Целия файл

@@ -51,12 +51,12 @@
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.11.0</version>
<version>2.13.4</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.11.0</version>
<version>2.13.4</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.jodah/typetools -->
<!-- <dependency>-->


+ 3
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/BpmStartedListener.java Целия файл

@@ -8,6 +8,7 @@ import cc.smtweb.framework.core.db.vo.ModelCatalog;
import cc.smtweb.framework.core.mvc.controller.IStartListener;
import cc.smtweb.framework.core.mvc.service.TreeHelper;
import cc.smtweb.framework.core.systask.SysServiceFactory;
import cc.smtweb.framework.core.systask.SysThreadPool;
import cc.smtweb.system.bpm.web.design.db.ModelCatalogTreeHelper;
import cc.smtweb.system.bpm.web.sys.base.job.JobUtils;
import cc.smtweb.system.bpm.web.sys.oneTimeService.OneTimeServiceFactory;
@@ -27,7 +28,7 @@ public class BpmStartedListener implements IStartListener {
SwConsts.SysParam.RUN_PROJECTS = "bpm";
SysServiceFactory.getInstance().reg(new OneTimeTaskCleanService());
TreeHelper.regTreeHelper(ModelCatalog.ENTITY_NAME, ModelCatalogTreeHelper.class);
}

@Override
@@ -44,5 +45,6 @@ public class BpmStartedListener implements IStartListener {
public void close() {
OneTimeServiceFactory.getInstance().stop();
JobUtils.getInstance().stop();
SysThreadPool.getInstance().stop();
}
}

+ 0
- 168
smtweb-framework/canal/client/canal.example.iml Целия файл

@@ -1,168 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping />
<naming-strategy-map />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.client:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-haproxy:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-http:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-http2:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-memcache:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-mqtt:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-redis:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-smtp:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-socks:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-stomp:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-xml:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler-proxy:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-rxtx:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-sctp:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-udt:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-classes-epoll:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-classes-kqueue:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns-classes-macos:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:linux-x86_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:linux-aarch_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-kqueue:osx-x86_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-kqueue:osx-aarch_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver-dns-native-macos:osx-x86_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver-dns-native-macos:osx-aarch_64:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.jboss.netty:netty:3.2.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.101tec:zkclient:0.10" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:22.0" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.3.21" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.protocol:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.common:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.4" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.11" level="project" />
<orderEntry type="module" module-name="sw-system-bpm" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.6.9" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.64" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.64" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.64" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.21" level="project" />
<orderEntry type="module" module-name="sw-framework-core" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.15" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.6.9" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:6.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.19" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:kryo:4.0.0" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:reflectasm:1.11.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:minlog:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.2" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-jexl3:3.2.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.tika:tika-core:2.1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.19.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.31" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.21" level="project" />
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.17" level="project" />
<orderEntry type="library" name="Maven: org.jclarion:image4j:0.7" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.29" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2.1" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:6.2.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity-engine-core:2.3" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-net:commons-net:3.6" level="project" />
<orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.53" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.29" level="project" />
<orderEntry type="library" name="Maven: org.apache.ddlutils:ddlutils:1.0" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
<orderEntry type="library" name="Maven: oro:oro:2.0.8" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.5.0" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.2" level="project" />
</component>
</module>

+ 1
- 1
smtweb-framework/canal/client/pom.xml Целия файл

@@ -8,7 +8,7 @@
</parent>

<groupId>cc.smtweb</groupId>
<artifactId>canal.client</artifactId>
<artifactId>canal.example</artifactId>
<version>1.1.6</version>

<dependencies>


+ 54
- 0
smtweb-framework/canal/client/src/main/assembly/dev.xml Целия файл

@@ -0,0 +1,54 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>dist</id>
<formats>
<format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>.</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>README*</include>
</includes>
</fileSet>
<fileSet>
<directory>./src/main/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>./src/main/conf</directory>
<outputDirectory>/conf</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet>
<directory>./src/main/resources</directory>
<outputDirectory>/conf</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>logs</outputDirectory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
<excludes>
<exclude>junit:junit</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>

+ 54
- 0
smtweb-framework/canal/client/src/main/assembly/release.xml Целия файл

@@ -0,0 +1,54 @@
<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>dist</id>
<formats>
<format>tar.gz</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>.</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>README*</include>
</includes>
</fileSet>
<fileSet>
<directory>./src/main/bin</directory>
<outputDirectory>bin</outputDirectory>
<includes>
<include>**/*</include>
</includes>
<fileMode>0755</fileMode>
</fileSet>
<fileSet>
<directory>./src/main/conf</directory>
<outputDirectory>/conf</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet>
<directory>./src/main/resources</directory>
<outputDirectory>/conf</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>
<fileSet>
<directory>target</directory>
<outputDirectory>logs</outputDirectory>
<excludes>
<exclude>**/*</exclude>
</excludes>
</fileSet>
</fileSets>
<dependencySets>
<dependencySet>
<outputDirectory>lib</outputDirectory>
<excludes>
<exclude>junit:junit</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>

+ 15
- 0
smtweb-framework/canal/client/src/main/bin/restart.sh Целия файл

@@ -0,0 +1,15 @@
#!/bin/bash

args=$@

case $(uname) in
Linux)
bin_abs_path=$(readlink -f $(dirname $0))
;;
*)
bin_abs_path=$(cd $(dirname $0) ||exit ; pwd)
;;
esac

sh "$bin_abs_path"/stop.sh $args
sh "$bin_abs_path"/startup.sh $args

+ 23
- 0
smtweb-framework/canal/client/src/main/bin/startup.bat Целия файл

@@ -0,0 +1,23 @@
@echo off
@if not "%ECHO%" == "" echo %ECHO%
@if "%OS%" == "Windows_NT" setlocal

set ENV_PATH=.\
if "%OS%" == "Windows_NT" set ENV_PATH=%~dp0%

set conf_dir=%ENV_PATH%\..\conf
set logback_configurationFile=%conf_dir%\logback.xml
set client_mode=Simple
if not "%1" == "" set client_mode=%1

set CLASSPATH=%conf_dir%
set CLASSPATH=%conf_dir%\..\lib\*;%CLASSPATH%

set JAVA_MEM_OPTS= -Xms128m -Xmx512m -XX:PermSize=128m
set JAVA_OPTS_EXT= -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dapplication.codeset=UTF-8 -Dfile.encoding=UTF-8
set JAVA_DEBUG_OPT= -server -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=9199,server=y,suspend=n
set CANAL_OPTS= -DappName=otter-canal-example -Dlogback.configurationFile="%logback_configurationFile%"

set JAVA_OPTS= %JAVA_MEM_OPTS% %JAVA_OPTS_EXT% %JAVA_DEBUG_OPT% %CANAL_OPTS%

java %JAVA_OPTS% -classpath "%CLASSPATH%" cc.smtweb.system.canal.example.ClientLauncher

+ 105
- 0
smtweb-framework/canal/client/src/main/bin/startup.sh Целия файл

@@ -0,0 +1,105 @@
#!/bin/bash

current_path=`pwd`
case "`uname`" in
Linux)
bin_abs_path=$(readlink -f $(dirname $0))
;;
*)
bin_abs_path=`cd $(dirname $0); pwd`
;;
esac
base=${bin_abs_path}/..
client_mode="Simple"
logback_configurationFile=$base/conf/logback.xml
export LANG=en_US.UTF-8
export BASE=$base

if [ -f $base/bin/canal.pid ] ; then
echo "found canal.pid , Please run stop.sh first ,then startup.sh" 2>&2
exit 1
fi

## set java path
if [ -z "$JAVA" ] ; then
JAVA=$(which java)
fi

ALIBABA_JAVA="/usr/alibaba/java/bin/java"
TAOBAO_JAVA="/opt/taobao/java/bin/java"
if [ -z "$JAVA" ]; then
if [ -f $ALIBABA_JAVA ] ; then
JAVA=$ALIBABA_JAVA
elif [ -f $TAOBAO_JAVA ] ; then
JAVA=$TAOBAO_JAVA
else
echo "Cannot find a Java JDK. Please set either set JAVA or put java (>=1.5) in your PATH." 2>&2
exit 1
fi
fi

case "$#"
in
0 )
;;
1 )
client_mode=$*
;;
2 )
if [ "$1" = "debug" ]; then
DEBUG_PORT=$2
DEBUG_SUSPEND="y"
JAVA_DEBUG_OPT="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=$DEBUG_PORT,server=y,suspend=$DEBUG_SUSPEND"
else
client_mode=$1
fi;;
* )
echo "THE PARAMETERS MUST BE TWO OR LESS.PLEASE CHECK AGAIN."
exit;;
esac

JavaVersion=`$JAVA -version 2>&1 |awk 'NR==1{ gsub(/"/,""); print $3 }' | awk -F '.' '{print $1}'`
str=`file -L $JAVA | grep 64-bit`

JAVA_OPTS="$JAVA_OPTS -Xss256k -XX:+AggressiveOpts -XX:-UseBiasedLocking -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$base/logs"
if [ $JavaVersion -ge 11 ] ; then
#JAVA_OPTS="$JAVA_OPTS -Xlog:gc*:$base_log/gc.log:time "
JAVA_OPTS="$JAVA_OPTS"
else
#JAVA_OPTS="$JAVA_OPTS -Xloggc:$base/logs/canal/gc.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCApplicationStoppedTime"
JAVA_OPTS="$JAVA_OPTS -XX:+UseFastAccessorMethods -XX:+PrintAdaptiveSizePolicy -XX:+PrintTenuringDistribution"
fi

if [ -n "$str" ]; then
# JAVA_OPTS="-server -Xms2048m -Xmx3072m -Xmn1024m -XX:SurvivorRatio=2 -XX:PermSize=96m -XX:MaxPermSize=256m -XX:MaxTenuringThreshold=15 -XX:+DisableExplicitGC $JAVA_OPTS"
# For G1
JAVA_OPTS="-server -Xms2g -Xmx3g -XX:+UseG1GC -XX:MaxGCPauseMillis=250 -XX:+UseGCOverheadLimit -XX:+ExplicitGCInvokesConcurrent $JAVA_OPTS"
else
JAVA_OPTS="-server -Xms1024m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:MaxPermSize=128m $JAVA_OPTS"
fi

JAVA_OPTS=" $JAVA_OPTS -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true -Dfile.encoding=UTF-8"
CANAL_OPTS="-DappName=otter-canal-example -Dlogback.configurationFile=$logback_configurationFile"

if [ -e $logback_configurationFile ]
then

for i in $base/lib/*;
do CLASSPATH=$i:"$CLASSPATH";
done
CLASSPATH="$base/conf:$CLASSPATH";

echo "cd to $bin_abs_path for workaround relative path"
cd $bin_abs_path

echo LOG CONFIGURATION : $logback_configurationFile
echo client mode : $client_mode
echo CLASSPATH :$CLASSPATH
$JAVA $JAVA_OPTS $JAVA_DEBUG_OPT $CANAL_OPTS -classpath .:$CLASSPATH cc.smtweb.system.canal.example.ClientLauncher 1>>$base/bin/nohup.out 2>&1 &

echo $! > $base/bin/canal.pid
echo "cd to $current_path for continue"
cd $current_path
else
echo "client mode("$client_mode") OR log configration file($logback_configurationFile) is not exist,please create then first!"
fi

+ 53
- 0
smtweb-framework/canal/client/src/main/bin/stop.sh Целия файл

@@ -0,0 +1,53 @@
#!/bin/bash

cygwin=false;
case "`uname`" in
CYGWIN*)
cygwin=true
;;
esac

get_pid() {
STR=$1
PID=$2
if $cygwin; then
JAVA_CMD="$JAVA_HOME\bin\java"
JAVA_CMD=`cygpath --path --unix $JAVA_CMD`
JAVA_PID=`ps |grep $JAVA_CMD |awk '{print $1}'`
else
if [ ! -z "$PID" ]; then
JAVA_PID=`ps -C java -f --width 1000|grep "$STR"|grep "$PID"|grep -v grep|awk '{print $2}'`
else
JAVA_PID=`ps -C java -f --width 1000|grep "$STR"|grep -v grep|awk '{print $2}'`
fi
fi
echo $JAVA_PID;
}

base=`dirname $0`/..
pidfile=$base/bin/canal.pid
if [ ! -f "$pidfile" ];then
echo "canal is not running. exists"
exit
fi

pid=`cat $pidfile`
if [ "$pid" == "" ] ; then
pid=`get_pid "appName=otter-canal-example"`
fi

echo -e "`hostname`: stopping canal $pid ... "
kill $pid

LOOPS=0
while (true);
do
gpid=`get_pid "appName=otter-canal-example" "$pid"`
if [ "$gpid" == "" ] ; then
echo "Oook! cost:$LOOPS"
`rm $pidfile`
break;
fi
let LOOPS=LOOPS+1
sleep 1
done

+ 13
- 0
smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientApplication.java Целия файл

@@ -0,0 +1,13 @@
package cc.smtweb.system.canal.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class ClientApplication {

public static void main(String[] args) {
SpringApplication.run(ClientApplication.class, args);
}

}

+ 21
- 0
smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientConfiguration.java Целия файл

@@ -0,0 +1,21 @@
package cc.smtweb.system.canal.example;

import cc.smtweb.framework.core.mvc.config.ControllerConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
* @author kevin
*/
@Configuration
@ComponentScan
public class ClientConfiguration {
/**
* 配置自定义service扫描路径 {module}/{service}/{method}
*/
@Bean
public ControllerConfig clientConfiguration() {
return new ControllerConfig("canalClient", "cc.smtweb.system.canal.client", null);
}
}

smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/client/ClientConsts.java → smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientConsts.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.client;
package cc.smtweb.system.canal.example;

import org.apache.commons.lang.StringUtils;


smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/client/ClientInstance.java → smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientInstance.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.client;
package cc.smtweb.system.canal.example;

import cc.smtweb.framework.core.util.CommUtil;
import cc.smtweb.framework.core.util.JsonUtil;
@@ -70,9 +70,9 @@ public class ClientInstance {
connector = CanalConnectors.newSingleConnector(new
InetSocketAddress(ClientConsts.getIp(properties),
ClientConsts.getPort(properties)), ClientConsts.getInstance(properties), ClientConsts.getUsername(properties), ClientConsts.getPassword(properties));
connector.connect();
connector.subscribe(ClientConsts.getFilter(properties));
connector.rollback();
//connector.connect();
//connector.subscribe(ClientConsts.getFilter(properties));
//connector.rollback();

Runtime.getRuntime().addShutdownHook(new Thread(() -> {
try {

+ 14
- 0
smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientLauncher.java Целия файл

@@ -0,0 +1,14 @@
package cc.smtweb.system.canal.example;

/**
* @Author yaoq
* @Date 2022年09月14日 10:27
* @Description
*/
public class ClientLauncher {

public static void main(String[] args) {
ClientInstance.getInstance().start();
}

}

smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/client/ClientStartedListener.java → smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientStartedListener.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.client;
package cc.smtweb.system.canal.example;

import cc.smtweb.framework.core.annotation.SwStartListener;
import cc.smtweb.framework.core.common.SwConsts;
@@ -29,4 +29,9 @@ public class ClientStartedListener implements IStartListener {
public void run() {
ClientInstance.getInstance().start();
}

@Override
public void close() {
ClientInstance.getInstance().stop();
}
}

smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/client/ClientVO.java → smtweb-framework/canal/client/src/main/java/cc/smtweb/system/canal/example/ClientVO.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.client;
package cc.smtweb.system.canal.example;

import java.util.Map;


+ 2
- 0
smtweb-framework/canal/client/src/main/resources/META-INF/spring.factories Целия файл

@@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cc.smtweb.system.canal.example.ClientConfiguration

+ 5
- 5
smtweb-framework/canal/client/src/main/resources/client.properties Целия файл

@@ -1,14 +1,14 @@
#canal ???????
# ??????? ??MB
#canal 客户端配置
# 单次读取数据量大小 单位:MB
canal.server.size=50
# ??????
# canal 服务端实例名,端口,IP
canal.server.instance=example
canal.server.ip=127.0.0.1
canal.server.port=11111
# ????????? ??????
# canal 服务端访问用户名,密码
canal.server.username=
canal.server.password=
# ??????????.*\\..*??????scmz\\..*
# 数据库匹配规则.*\\..*, scmz\\..*
canal.server.filter=.*\\..*



+ 0
- 198
smtweb-framework/canal/server/canal.server.iml Целия файл

@@ -1,198 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="jpa" name="JPA">
<configuration>
<setting name="validation-enabled" value="true" />
<datasource-mapping />
<naming-strategy-map />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.protocol:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.common:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.fastjson2:fastjson2:2.0.4" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: com.google.protobuf:protobuf-java:3.6.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.client:1.1.6" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-dns:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-haproxy:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-http:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-http2:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-memcache:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-mqtt:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-redis:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-smtp:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-socks:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-stomp:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec-xml:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler-proxy:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-rxtx:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-sctp:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-udt:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-classes-epoll:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport-classes-kqueue:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver-dns-classes-macos:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:linux-x86_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-epoll:linux-aarch_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-kqueue:osx-x86_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-transport-native-kqueue:osx-aarch_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver-dns-native-macos:osx-x86_64:4.1.78.Final" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.netty:netty-resolver-dns-native-macos:osx-aarch_64:4.1.78.Final" level="project" />
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.jboss.netty:netty:3.2.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.101tec:zkclient:0.10" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:22.0" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.0.18" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.mojo:animal-sniffer-annotations:1.14" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.3.21" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.server:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.instance.core:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.store:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.meta:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.parse:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.sink:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.parse.dbsync:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.filter:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.parse.driver:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.10" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.4" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.4" level="project" />
<orderEntry type="library" name="Maven: com.h2database:h2:1.4.200" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.9" level="project" />
<orderEntry type="library" name="Maven: com.lmax:disruptor:3.4.2" level="project" />
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.instance.spring:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:canal.instance.manager:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.otter:connector.core:1.1.6" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.aviator:aviator:2.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.2" level="project" />
<orderEntry type="library" name="Maven: oro:oro:2.0.8" level="project" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.9.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.alibaba.otter:canal.prometheus:1.1.6" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jctools:jctools-core:2.1.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_tracer_otel:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_tracer_common:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_tracer_otel_agent:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_hotspot:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_httpserver:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_common:0.12.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.prometheus:simpleclient_pushgateway:0.12.0" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.alibaba.otter:connector.kafka:jar-with-dependencies:1.1.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.alibaba.otter:connector.rocketmq:jar-with-dependencies:1.1.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.alibaba.otter:connector.rabbitmq:jar-with-dependencies:1.1.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: com.alibaba.otter:connector.pulsarmq:jar-with-dependencies:1.1.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.6.9" level="project" />
<orderEntry type="module" module-name="sw-framework-core" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.29" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.6.9" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.64" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.64" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.64" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.3.21" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.15" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.6.9" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:6.1.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.4.19" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.11.1" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:kryo:4.0.0" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:reflectasm:1.11.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:minlog:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.2" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.24" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-jexl3:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.tika:tika-core:2.1.0" level="project" />
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.9.3" level="project" />
<orderEntry type="library" name="Maven: org.checkerframework:checker-qual:3.19.0" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.29" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
<orderEntry type="module" module-name="sw-system-bpm" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-freemarker:2.6.9" level="project" />
<orderEntry type="library" name="Maven: org.freemarker:freemarker:2.3.31" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.3.21" level="project" />
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.17" level="project" />
<orderEntry type="library" name="Maven: org.jclarion:image4j:0.7" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.3" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.2.1" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:6.2.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.velocity:velocity-engine-core:2.3" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.0.6" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.9" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
<orderEntry type="library" name="Maven: commons-net:commons-net:3.6" level="project" />
<orderEntry type="library" name="Maven: com.jcraft:jsch:0.1.53" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
</component>
</module>

+ 13
- 18
smtweb-framework/canal/server/pom.xml Целия файл

@@ -1,4 +1,5 @@
<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">
<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">
<modelVersion>4.0.0</modelVersion>

<parent>
@@ -9,28 +10,16 @@
</parent>

<groupId>cc.smtweb</groupId>
<artifactId>canal.server</artifactId>
<artifactId>canal.deployer</artifactId>
<version>1.1.6</version>

<dependencies>

<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.protocol</artifactId>
<version>1.1.6</version>
</dependency>
<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.client</artifactId>
<version>1.1.6</version>
</dependency>

<dependency>
<groupId>com.alibaba.otter</groupId>
<artifactId>canal.server</artifactId>
<version>1.1.6</version>
</dependency>

<!-- 这里指定runtime的metrics provider-->
<dependency>
<groupId>com.alibaba.otter</groupId>
@@ -91,27 +80,33 @@
<classifier>jar-with-dependencies</classifier>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>

<dependency>
<groupId>cc.smtweb</groupId>
<artifactId>sw-framework-core</artifactId>
<version>3.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>cc.smtweb</groupId>
<artifactId>sw-system-bpm</artifactId>
<version>3.1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
<plugins>

<!--<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>-->

<plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
@@ -127,7 +122,7 @@
</excludes>
</configuration>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
@@ -187,7 +182,7 @@
<descriptors>
<descriptor>${basedir}/src/main/assembly/dev.xml</descriptor>
</descriptors>
<finalName>canal</finalName>
<finalName>canal-deployer</finalName>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</plugin>


+ 2
- 2
smtweb-framework/canal/server/src/main/bin/startup.bat Целия файл

@@ -21,7 +21,7 @@ set CANAL_OPTS= -DappName=otter-canal -Dlogback.configurationFile="%logback_conf

set JAVA_OPTS= %JAVA_MEM_OPTS% %JAVA_OPTS_EXT% %JAVA_DEBUG_OPT% %CANAL_OPTS%

set CMD_STR= java %JAVA_OPTS% -classpath "%CLASSPATH%" java %JAVA_OPTS% -classpath "%CLASSPATH%" CanalLauncher
set CMD_STR= java %JAVA_OPTS% -classpath "%CLASSPATH%" java %JAVA_OPTS% -classpath "%CLASSPATH%" cc.smtweb.system.canal.deployer.CanalLauncher
echo start cmd : %CMD_STR%

java %JAVA_OPTS% -classpath "%CLASSPATH%" CanalLauncher
java %JAVA_OPTS% -classpath "%CLASSPATH%" cc.smtweb.system.canal.deployer.CanalLauncher

+ 17
- 17
smtweb-framework/canal/server/src/main/bin/startup.sh Целия файл

@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/bash

current_path=`pwd`
case "`uname`" in
@@ -21,7 +21,7 @@ if [ -f $base/bin/canal.pid ] ; then
exit 1
fi

if [ ! -d $base/logs/canal ] ; then
if [ ! -d $base/logs/canal ] ; then
mkdir -p $base/logs/canal
fi

@@ -43,30 +43,30 @@ if [ -z "$JAVA" ]; then
fi
fi

case "$#"
case "$#"
in
0 )
0 )
;;
1 )
1 )
var=$*
if [ "$var" = "local" ]; then
canal_conf=$canal_local_conf
else
if [ -f $var ] ; then
if [ -f $var ] ; then
canal_conf=$var
else
echo "THE PARAMETER IS NOT CORRECT.PLEASE CHECK AGAIN."
exit
fi
fi;;
2 )
2 )
var=$1
if [ "$var" = "local" ]; then
canal_conf=$canal_local_conf
else
if [ -f $var ] ; then
canal_conf=$var
else
else
if [ "$1" = "debug" ]; then
DEBUG_PORT=$2
DEBUG_SUSPEND="n"
@@ -103,24 +103,24 @@ JAVA_OPTS=" $JAVA_OPTS -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true
CANAL_OPTS="-DappName=otter-canal -Dlogback.configurationFile=$logback_configurationFile -Dcanal.conf=$canal_conf"

if [ -e $canal_conf -a -e $logback_configurationFile ]
then
then
for i in $base/lib/*;
do CLASSPATH=$i:"$CLASSPATH";
done
CLASSPATH="$base/conf:$CLASSPATH";
echo "cd to $bin_abs_path for workaround relative path"
cd $bin_abs_path
echo LOG CONFIGURATION : $logback_configurationFile
echo canal conf : $canal_conf
echo canal conf : $canal_conf
echo CLASSPATH :$CLASSPATH
$JAVA $JAVA_OPTS $JAVA_DEBUG_OPT $CANAL_OPTS -classpath .:$CLASSPATH com.alibaba.otter.canal.deployer.CanalLauncher 1>>$base/logs/canal/canal_stdout.log 2>&1 &
echo $! > $base/bin/canal.pid
$JAVA $JAVA_OPTS $JAVA_DEBUG_OPT $CANAL_OPTS -classpath .:$CLASSPATH cc.smtweb.system.canal.server.CanalLauncher 1>>$base/logs/canal/canal_stdout.log 2>&1 &
echo $! > $base/bin/canal.pid
echo "cd to $current_path for continue"
cd $current_path
else
else
echo "canal conf("$canal_conf") OR log configration file($logback_configurationFile) is not exist,please create then first!"
fi

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/CanalApplication.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalApplication.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

+ 21
- 0
smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalConfiguration.java Целия файл

@@ -0,0 +1,21 @@
package cc.smtweb.system.canal.deployer;

import cc.smtweb.framework.core.mvc.config.ControllerConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
* @author kevin
*/
@Configuration
@ComponentScan
public class CanalConfiguration {
/**
* 配置自定义service扫描路径 {module}/{service}/{method}
*/
@Bean
public ControllerConfig canalConfiguration() {
return new ControllerConfig("canalServer", "cc.smtweb.system.canal.server", null);
}
}

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/CanalConstants.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalConstants.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import java.text.MessageFormat;


smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/CanalController.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalController.java Целия файл

@@ -1,12 +1,12 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import java.util.Map;
import java.util.Properties;

import cc.smtweb.system.canal.server.monitor.InstanceAction;
import cc.smtweb.system.canal.server.monitor.InstanceConfigMonitor;
import cc.smtweb.system.canal.server.monitor.ManagerInstanceConfigMonitor;
import cc.smtweb.system.canal.server.monitor.SpringInstanceConfigMonitor;
import cc.smtweb.system.canal.deployer.monitor.InstanceAction;
import cc.smtweb.system.canal.deployer.monitor.InstanceConfigMonitor;
import cc.smtweb.system.canal.deployer.monitor.ManagerInstanceConfigMonitor;
import cc.smtweb.system.canal.deployer.monitor.SpringInstanceConfigMonitor;
import org.I0Itec.zkclient.IZkStateListener;
import org.I0Itec.zkclient.exception.ZkNoNodeException;
import org.I0Itec.zkclient.exception.ZkNodeExistsException;
@@ -24,7 +24,7 @@ import com.alibaba.otter.canal.common.zookeeper.running.ServerRunningData;
import com.alibaba.otter.canal.common.zookeeper.running.ServerRunningListener;
import com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitor;
import com.alibaba.otter.canal.common.zookeeper.running.ServerRunningMonitors;
import cc.smtweb.system.canal.server.InstanceConfig.InstanceMode;
import cc.smtweb.system.canal.deployer.InstanceConfig.InstanceMode;
import com.alibaba.otter.canal.instance.core.CanalInstanceGenerator;
import com.alibaba.otter.canal.instance.manager.PlainCanalInstanceGenerator;
import com.alibaba.otter.canal.instance.manager.plain.PlainCanalConfigClient;

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/CanalLauncher.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalLauncher.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import com.alibaba.otter.canal.common.utils.AddressUtils;
import com.alibaba.otter.canal.common.utils.NamedThreadFactory;

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/CanalStartedListener.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalStartedListener.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import cc.smtweb.framework.core.annotation.SwStartListener;
import cc.smtweb.framework.core.common.SwConsts;

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/CanalStarter.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/CanalStarter.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import java.util.Properties;

@@ -10,7 +10,7 @@ import org.slf4j.LoggerFactory;
import com.alibaba.otter.canal.admin.netty.CanalAdminWithNetty;
import com.alibaba.otter.canal.connector.core.spi.CanalMQProducer;
import com.alibaba.otter.canal.connector.core.spi.ExtensionLoader;
import cc.smtweb.system.canal.server.admin.CanalAdminController;
import cc.smtweb.system.canal.deployer.admin.CanalAdminController;
import com.alibaba.otter.canal.server.CanalMQStarter;

/**

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/InstanceConfig.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/InstanceConfig.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server;
package cc.smtweb.system.canal.deployer;

import org.apache.commons.lang.builder.ToStringBuilder;


smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/admin/CanalAdminController.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/admin/CanalAdminController.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server.admin;
package cc.smtweb.system.canal.deployer.admin;

import java.io.File;
import java.security.NoSuchAlgorithmException;
@@ -8,11 +8,11 @@ import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import cc.smtweb.system.canal.server.CanalStarter;
import cc.smtweb.system.canal.server.monitor.InstanceConfigMonitor;
import cc.smtweb.system.canal.server.monitor.ManagerInstanceConfigMonitor;
import cc.smtweb.system.canal.server.monitor.SpringInstanceConfigMonitor;
import cc.smtweb.system.canal.server.monitor.InstanceAction;
import cc.smtweb.system.canal.deployer.CanalStarter;
import cc.smtweb.system.canal.deployer.monitor.InstanceConfigMonitor;
import cc.smtweb.system.canal.deployer.monitor.ManagerInstanceConfigMonitor;
import cc.smtweb.system.canal.deployer.monitor.SpringInstanceConfigMonitor;
import cc.smtweb.system.canal.deployer.monitor.InstanceAction;
import org.apache.commons.io.filefilter.TrueFileFilter;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
@@ -20,7 +20,7 @@ import org.slf4j.LoggerFactory;

import com.alibaba.otter.canal.admin.CanalAdmin;
import com.alibaba.otter.canal.common.utils.FileUtils;
import cc.smtweb.system.canal.server.InstanceConfig;
import cc.smtweb.system.canal.deployer.InstanceConfig;
import com.alibaba.otter.canal.instance.core.CanalInstance;
import com.alibaba.otter.canal.protocol.SecurityUtil;
import com.alibaba.otter.canal.server.embedded.CanalServerWithEmbedded;

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/monitor/InstanceAction.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/InstanceAction.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server.monitor;
package cc.smtweb.system.canal.deployer.monitor;

/**
* config配置变化

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/monitor/InstanceConfigMonitor.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/InstanceConfigMonitor.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server.monitor;
package cc.smtweb.system.canal.deployer.monitor;

import com.alibaba.otter.canal.common.CanalLifeCycle;


smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/monitor/ManagerInstanceConfigMonitor.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/ManagerInstanceConfigMonitor.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server.monitor;
package cc.smtweb.system.canal.deployer.monitor;

import java.util.ArrayList;
import java.util.List;

smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/server/monitor/SpringInstanceConfigMonitor.java → smtweb-framework/canal/server/src/main/java/cc/smtweb/system/canal/deployer/monitor/SpringInstanceConfigMonitor.java Целия файл

@@ -1,4 +1,4 @@
package cc.smtweb.system.canal.server.monitor;
package cc.smtweb.system.canal.deployer.monitor;

import java.io.File;
import java.util.ArrayList;

+ 2
- 0
smtweb-framework/canal/server/src/main/resources/META-INF/spring.factories Целия файл

@@ -0,0 +1,2 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
cc.smtweb.system.canal.deployer.CanalConfiguration

+ 9
- 7
smtweb-framework/canal/server/src/main/resources/canal.properties Целия файл

@@ -1,17 +1,19 @@
#################################################
######### common argument #############
#################################################
# tcp bind ip
# 服务端IP 可以为空
canal.ip =
# register ip to zookeeper
canal.register.ip =
# 服务端口
canal.port = 11111
canal.metrics.pull.port = 11112
# canal instance user/passwd
# 服务用户名,密码,可以为空
# canal.user = canal
# canal.passwd = E3619321C1A937C46A0D8BD1DAC39F93B27D4458

# canal admin config

#######后面的配置不用管#######
canal.register.ip =
#canal admin config
#canal.admin.manager = 127.0.0.1:8089
canal.admin.port = 11110
canal.admin.user = admin
@@ -161,7 +163,7 @@ rocketmq.namespace =
rocketmq.namesrv.addr = 127.0.0.1:9876
rocketmq.retry.times.when.send.failed = 0
rocketmq.vip.channel.enabled = false
rocketmq.tag =
rocketmq.tag =

##################################################
######### RabbitMQ #############
@@ -179,4 +181,4 @@ rabbitmq.deliveryMode =
##################################################
pulsarmq.serverUrl =
pulsarmq.roleToken =
pulsarmq.topicTenantPrefix =
pulsarmq.topicTenantPrefix =

+ 3
- 4
smtweb-framework/canal/server/src/main/resources/example/instance.properties Целия файл

@@ -1,11 +1,11 @@
#################################################
## mysql serverId , v1.0.26+ will autoGen
# 从库ID 必须和主库不一致,多重库也不一致
canal.instance.mysql.slaveId=2

# enable gtid use true/false
canal.instance.gtidon=false
# position info
# 主库信息
# 主库地址及端口
canal.instance.master.address=172.28.123.25:3306
#canal.instance.master.journal.name=
#canal.instance.master.position=
@@ -22,7 +22,6 @@ canal.instance.tsdb.enable=true
#canal.instance.tsdb.url=jdbc:mysql://127.0.0.1:3306/canal_tsdb
#canal.instance.tsdb.dbUsername=canal
#canal.instance.tsdb.dbPassword=canal

#canal.instance.standby.address =
#canal.instance.standby.journal.name =
#canal.instance.standby.position =


+ 2
- 2
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysServiceFactory.java Целия файл

@@ -29,7 +29,7 @@ public class SysServiceFactory {
private List<BaseSysService> listService = new ArrayList<>();

public SysServiceFactory() {
}

//注册任务
@@ -53,6 +53,6 @@ public class SysServiceFactory {

//停止任务
public void stop() {
schedule.shutdown();
if (schedule != null) schedule.shutdown();
}
}

+ 4
- 4
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysThreadPool.java Целия файл

@@ -38,7 +38,7 @@ public class SysThreadPool {
SecurityManager s = System.getSecurityManager();
group = (s != null) ? s.getThreadGroup() :
Thread.currentThread().getThreadGroup();
namePrefix = "DfpPool-" +
namePrefix = "SysPool-" +
poolNumber.getAndIncrement() +
"-Thread-";
}
@@ -63,14 +63,14 @@ public class SysThreadPool {
}
try {
threadPool.execute(worker);
log.debug("add task to DfpPool success -> [PoolSize:" + threadPool.getPoolSize() + ",ActiveCount:" + threadPool.getActiveCount() + ",CompletedTaskCount:" + threadPool.getCompletedTaskCount() + "]");
log.debug("add task to SysPool success -> [PoolSize:" + threadPool.getPoolSize() + ",ActiveCount:" + threadPool.getActiveCount() + ",CompletedTaskCount:" + threadPool.getCompletedTaskCount() + "]");
} catch (Exception e) {
log.debug("add task to DfpPool pools error:", e);
log.debug("add task to SysPool pools error:", e);
}
}

//停止任务
protected void stop() {
public void stop() {
if (threadPool != null) threadPool.shutdown();
}



+ 1
- 1
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/systask/SysThreadWorker.java Целия файл

@@ -23,7 +23,7 @@ public abstract class SysThreadWorker implements Runnable {
try {
localWork();
} catch (Exception e) {
log.error("DfpPool handle error:", e);
log.error("SysPool handle error:", e);
}
}



Зареждане…
Отказ
Запис