Commit bf767ca5 by 111-PC\111

[+]智能设备平台kafka消费

1 parent c14c2645
<?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>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
</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.glsx:rest-admin-context:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-container:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jetty:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: jakarta.websocket:jakarta.websocket-api:1.1.2" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlets:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-annotations:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-plus:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-commons:7.2" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-tree:7.2" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-analysis:7.2" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:javax-websocket-client-impl:9.4.27.v20200227" level="project" />
<orderEntry type="library" name="Maven: org.mortbay.jasper:apache-el:8.5.49" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-core:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.0.7" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.11" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-common:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.26.0-GA" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:29.0-jre" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:failureaccess:1.0.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava" level="project" />
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:3.0.2" level="project" />
<orderEntry type="library" name="Maven: com.google.j2objc:j2objc-annotations:1.3" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.13" level="project" />
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.13" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.12" level="project" />
<orderEntry type="library" name="Maven: eu.bitwalker:UserAgentUtils:1.20" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.70" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.6" level="project" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.5" level="project" />
<orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.1" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct-processor:1.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-exception:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
<orderEntry type="library" name="Maven: jakarta.servlet:jakarta.servlet-api:4.0.3" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-core:2.3.0" level="project" />
<orderEntry type="library" name="Maven: commons-configuration:commons-configuration:1.8" level="project" />
<orderEntry type="library" name="Maven: com.netflix.archaius:archaius-core:0.7.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-web:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-jwt:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.10.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-redis:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.2.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.3.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.7.0" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.10.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.10.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.10.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.5" level="project" />
<orderEntry type="library" name="Maven: jakarta.persistence:jakarta.persistence-api:2.2.3" level="project" />
<orderEntry type="library" name="Maven: com.github.ben-manes.caffeine:caffeine:2.8.1" level="project" />
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.3.4" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-alliance:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-config:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.10" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.3.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.3.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.13" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.3.3" level="project" />
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.2.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-registry:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-ribbon:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-ribbon:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-netflix-archaius:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-netflix-archaius:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.ribbon:ribbon-transport:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-contexts:0.4.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty-servo:0.4.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.hystrix:hystrix-core:1.5.18" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: io.reactivex:rxnetty:0.4.9" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-httpclient:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-client:1.19.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey:jersey-core:1.19.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.sun.jersey.contribs:jersey-apache-client4:1.19.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.servo:servo-core:0.12.21" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-commons-util:0.3.0" level="project" />
<orderEntry type="library" name="Maven: com.netflix.ribbon:ribbon-loadbalancer:2.3.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.netflix-commons:netflix-statistics:0.1.1" level="project" />
<orderEntry type="library" name="Maven: io.reactivex:rxjava:1.3.8" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-sentinel:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-sentinel:2.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-simple-http:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-transport-common:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-annotation-aspectj:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-core:1.8.0" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjrt:1.9.5" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-circuitbreaker-sentinel:2.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-reactor-adapter:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webflux-adapter:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-webmvc-adapter:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-parameter-flow-control:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:1.4.2" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-server-default:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-common-default:1.8.0" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.48.Final" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-cluster-client-default:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-datasource:2.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-nacos:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-datasource-extension:1.8.0" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.18.Final" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-sleuth:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-sleuth:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.64" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.64" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-aop:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-core:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-context-slf4j:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-messaging:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-rpc:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-web:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-http:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-rabbit:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-clients:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-kafka-streams:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpclient:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-httpasyncclient:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-spring-webmvc:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-servlet:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.brave:brave-instrumentation-jms:5.12.3" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter-metrics-micrometer:2.15.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-zipkin:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-sleuth-zipkin:2.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.zipkin2:zipkin:2.21.1" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter:2.15.0" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-reporter-brave:2.15.0" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-kafka:2.15.0" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-activemq-client:2.15.0" level="project" />
<orderEntry type="library" name="Maven: io.zipkin.reporter2:zipkin-sender-amqp-client:2.15.0" level="project" />
<orderEntry type="library" name="Maven: net.logstash.logback:logstash-logback-encoder:6.1" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-monitor:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.3.6" level="project" />
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.11" level="project" />
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-starter-client:2.2.3" level="project" />
<orderEntry type="library" name="Maven: de.codecentric:spring-boot-admin-client:2.2.3" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-gateway-client:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-sentinel-gateway:2.2.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-api-gateway-adapter-common:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-zuul-adapter:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.csp:sentinel-spring-cloud-gateway-adapter:1.8.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.10.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.10.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.10.3" level="project" />
<orderEntry type="library" name="Maven: org.jetbrains:annotations:13.0" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-mybatis:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-datasource:1.1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.19" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.2.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.1.3" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.4.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.1.3" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.5" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.5" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-starter:2.1.5" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-core:1.1.5" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-base:1.1.5" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-weekend:1.1.5" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring:1.1.5" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-extra:1.1.5" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper-spring-boot-autoconfigure:2.1.5" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.13" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.13" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.2" level="project" />
<orderEntry type="library" name="Maven: com.glsx.cloudframework:cloudframework-mq-kafka:3.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.glsx.cloudframework:cloudframework-mq:3.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jms:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.kafka:kafka_2.10:0.8.1.1" level="project" />
<orderEntry type="library" name="Maven: com.yammer.metrics:metrics-core:2.2.0" level="project" />
<orderEntry type="library" name="Maven: org.xerial.snappy:snappy-java:1.0.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.3.4" level="project" />
<orderEntry type="library" name="Maven: jline:jline:0.9.94" level="project" />
<orderEntry type="library" name="Maven: net.sf.jopt-simple:jopt-simple:3.2" level="project" />
<orderEntry type="library" name="Maven: org.scala-lang:scala-library:2.10.1" level="project" />
<orderEntry type="library" name="Maven: com.101tec:zkclient:0.3" level="project" />
<orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.8.0" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.1" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.5" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1.1" level="project" />
<orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.2.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.12.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.30" 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.25" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.2.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.2.6.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.xml.bind:jakarta.xml.bind-api:2.3.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: jakarta.activation:jakarta.activation-api:1.2.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter:5.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-api:5.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.apiguardian:apiguardian-api:1.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.opentest4j:opentest4j:1.2.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-commons:1.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-params:5.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.jupiter:junit-jupiter-engine:5.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.junit.platform:junit-platform-engine:1.5.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-junit-jupiter:3.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.13.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest:2.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:3.1.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.10.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.10.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.2.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.2.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.2.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.4" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:2.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.12" level="project" />
</component>
</module>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<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>
<groupId>com.glsx</groupId>
<artifactId>rest-framework-admin</artifactId>
<version>1.1.0-SNAPSHOT</version>
<relativePath/>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>glsx-smart-device-kafka-consumer</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<description>Microservice Scaffolding project for Spring Boot</description>
<dependencies>
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-context</artifactId>
<exclusions>
<exclusion>
<artifactId>checker-qual</artifactId>
<groupId>org.checkerframework</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-alliance</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
</dependency>
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-mybatis</artifactId>
<version>1.1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.glsx.cloudframework</groupId>
<artifactId>cloudframework-mq-kafka</artifactId>
<version>3.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
<artifactId>json-lib</artifactId>
<version>2.4</version>
</dependency>
</dependencies>
<build>
<plugins>
<!--mybatis 逆向生成插件-->
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.7</version>
</dependency>
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper</artifactId>
<version>3.4.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>Generate MyBatis Artifacts</id>
<!-- <phase>package</phase>-->
<phase>deploy</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!--允许移动生成的文件 -->
<verbose>true</verbose>
<!-- 是否覆盖 -->
<overwrite>false</overwrite>
<!-- 自动生成的配置 -->
<configurationFile>src/main/resources/config/generatorConfig.xml</configurationFile>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</project>
package cn.com.glsx;
import com.glsx.plat.context.EnableRestAdmin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.EnableMBeanExport;
import org.springframework.jmx.support.RegistrationPolicy;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import tk.mybatis.spring.annotation.MapperScan;
import javax.annotation.PostConstruct;
import java.util.TimeZone;
import static java.time.ZoneId.of;
import static java.util.TimeZone.getTimeZone;
/**
* @author payu
*/
@EnableRestAdmin
@EnableDiscoveryClient
@EnableTransactionManagement
@MapperScan(basePackages = "cn.com.glsx.smart.mapper")
@EnableMBeanExport(registration = RegistrationPolicy.IGNORE_EXISTING)
@SpringBootApplication(scanBasePackages = {"cn.com.glsx"})
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@PostConstruct
void started() {
TimeZone.setDefault(getTimeZone(of("Asia/Shanghai")));
}
}
package cn.com.glsx.smart.commons;
/**
* @author zhouhaibao
* @date 2021/3/16 14:57
*/
public class Constants {
public static final String MESSAGE_NOTI="1";
public static final String Order_Issue="2";
}
package cn.com.glsx.smart.entity;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @date 2021/3/16 15:14
*/
@Data
public class DeviceOrder {
private List<DeviceOrderDetail> commands;
}
package cn.com.glsx.smart.entity;
import lombok.Data;
/**
* @author zhouhaibao
* @date 2021/3/16 15:14
*/
@Data
public class DeviceOrderDetail {
private String code;
private String value;
}
package cn.com.glsx.smart.entity;
import lombok.Data;
/**
* @author zhouhaibao
* @date 2021/3/16 14:10
*/
@Data
public class MessageVo {
private String templateId;
}
package cn.com.glsx.smart.entity;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;
@Table(name = "smart_devide_status")
public class SmartDevideStatus implements Serializable {
@Id
private Integer id;
/**
* 设备id
*/
@Column(name = "device_id")
private String deviceId;
/**
* 设备指令
*/
@Column(name = "device_order_code")
private String deviceOrderCode;
/**
* 设备指令值
*/
@Column(name = "device_order_value")
private String deviceOrderValue;
/**
* 创建时间
*/
private Date createtime;
/**
* 更新时间
*/
private Date updatetime;
/**
* 产品id
*/
@Column(name = "product_key")
private String productKey;
private static final long serialVersionUID = 1L;
/**
* @return id
*/
public Integer getId() {
return id;
}
/**
* @param id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取设备id
*
* @return device_id - 设备id
*/
public String getDeviceId() {
return deviceId;
}
/**
* 设置设备id
*
* @param deviceId 设备id
*/
public void setDeviceId(String deviceId) {
this.deviceId = deviceId == null ? null : deviceId.trim();
}
/**
* 获取设备指令
*
* @return device_order_code - 设备指令
*/
public String getDeviceOrderCode() {
return deviceOrderCode;
}
/**
* 设置设备指令
*
* @param deviceOrderCode 设备指令
*/
public void setDeviceOrderCode(String deviceOrderCode) {
this.deviceOrderCode = deviceOrderCode == null ? null : deviceOrderCode.trim();
}
/**
* 获取设备指令值
*
* @return device_order_value - 设备指令值
*/
public String getDeviceOrderValue() {
return deviceOrderValue;
}
/**
* 设置设备指令值
*
* @param deviceOrderValue 设备指令值
*/
public void setDeviceOrderValue(String deviceOrderValue) {
this.deviceOrderValue = deviceOrderValue == null ? null : deviceOrderValue.trim();
}
/**
* 获取创建时间
*
* @return createtime - 创建时间
*/
public Date getCreatetime() {
return createtime;
}
/**
* 设置创建时间
*
* @param createtime 创建时间
*/
public void setCreatetime(Date createtime) {
this.createtime = createtime;
}
/**
* 获取更新时间
*
* @return updatetime - 更新时间
*/
public Date getUpdatetime() {
return updatetime;
}
/**
* 设置更新时间
*
* @param updatetime 更新时间
*/
public void setUpdatetime(Date updatetime) {
this.updatetime = updatetime;
}
/**
* 获取产品id
*
* @return product_key - 产品id
*/
public String getProductKey() {
return productKey;
}
/**
* 设置产品id
*
* @param productKey 产品id
*/
public void setProductKey(String productKey) {
this.productKey = productKey == null ? null : productKey.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", deviceId=").append(deviceId);
sb.append(", deviceOrderCode=").append(deviceOrderCode);
sb.append(", deviceOrderValue=").append(deviceOrderValue);
sb.append(", createtime=").append(createtime);
sb.append(", updatetime=").append(updatetime);
sb.append(", productKey=").append(productKey);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.smart.entity;
import java.io.Serializable;
import javax.persistence.*;
@Table(name = "smart_template_param")
public class SmartTemplateParam implements Serializable {
/**
* 标识ID
*/
@Id
private Long id;
/**
* 模板ID 关联smart_scene_template中id
*/
@Column(name = "template_id")
private Long templateId;
/**
* 类型 1触发条件 2执行内容
*/
private Byte type;
/**
* 排序
*/
private Byte sort;
/**
* 参数key
*/
@Column(name = "param_key")
private String paramKey;
/**
* 模板值 数组对象
*/
@Column(name = "param_value")
private String paramValue;
private static final long serialVersionUID = 1L;
/**
* 获取标识ID
*
* @return id - 标识ID
*/
public Long getId() {
return id;
}
/**
* 设置标识ID
*
* @param id 标识ID
*/
public void setId(Long id) {
this.id = id;
}
/**
* 获取模板ID 关联smart_scene_template中id
*
* @return template_id - 模板ID 关联smart_scene_template中id
*/
public Long getTemplateId() {
return templateId;
}
/**
* 设置模板ID 关联smart_scene_template中id
*
* @param templateId 模板ID 关联smart_scene_template中id
*/
public void setTemplateId(Long templateId) {
this.templateId = templateId;
}
/**
* 获取类型 1触发条件 2执行内容
*
* @return type - 类型 1触发条件 2执行内容
*/
public Byte getType() {
return type;
}
/**
* 设置类型 1触发条件 2执行内容
*
* @param type 类型 1触发条件 2执行内容
*/
public void setType(Byte type) {
this.type = type;
}
/**
* 获取排序
*
* @return sort - 排序
*/
public Byte getSort() {
return sort;
}
/**
* 设置排序
*
* @param sort 排序
*/
public void setSort(Byte sort) {
this.sort = sort;
}
/**
* 获取参数key
*
* @return param_key - 参数key
*/
public String getParamKey() {
return paramKey;
}
/**
* 设置参数key
*
* @param paramKey 参数key
*/
public void setParamKey(String paramKey) {
this.paramKey = paramKey == null ? null : paramKey.trim();
}
/**
* 获取模板值 数组对象
*
* @return param_value - 模板值 数组对象
*/
public String getParamValue() {
return paramValue;
}
/**
* 设置模板值 数组对象
*
* @param paramValue 模板值 数组对象
*/
public void setParamValue(String paramValue) {
this.paramValue = paramValue == null ? null : paramValue.trim();
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", templateId=").append(templateId);
sb.append(", type=").append(type);
sb.append(", sort=").append(sort);
sb.append(", paramKey=").append(paramKey);
sb.append(", paramValue=").append(paramValue);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.smart.mapper;
import cn.com.glsx.smart.entity.SmartDevideStatus;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface SmartDevideStatusMapper extends CommonBaseMapper<SmartDevideStatus> {
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.smart.mapper;
import cn.com.glsx.smart.entity.SmartTemplateParam;
import com.glsx.plat.mybatis.mapper.CommonBaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface SmartTemplateParamMapper extends CommonBaseMapper<SmartTemplateParam> {
List<SmartTemplateParam> findByTemplateId(@Param("templateId") String templateId);
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.smart.queue;
import cn.com.glsx.smart.queue.base.MessageReceiver;
import cn.com.glsx.smart.service.OrderIssueService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author zhouhaibao
* @date 2021/3/12 16:33
*/
@Slf4j
public class OrderIssueConsumer extends MessageReceiver {
@Autowired
private OrderIssueService orderIssueService;
@Override
public void processMessage(String topic, byte[] message) {
log.info("开始消费----------{}",message);
}
}
package cn.com.glsx.smart.queue.base;
import kafka.consumer.Consumer;
import kafka.consumer.ConsumerConfig;
import kafka.consumer.ConsumerIterator;
import kafka.consumer.KafkaStream;
import kafka.message.MessageAndMetadata;
import lombok.extern.slf4j.Slf4j;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* @author Cruise.Xu
*
*/
@Slf4j
public abstract class MessageReceiver {
protected ConsumerConfig consumerConfig;
protected String topic;
protected Integer nThreads;
protected kafka.javaapi.consumer.ConsumerConnector connector;
protected Map<String, Integer> topicCountMap = new HashMap<>();
public abstract void processMessage(String topic,byte[] message);
protected void init() {
connector = Consumer.createJavaConsumerConnector(consumerConfig);
int threadCnt = 1;
if (null != nThreads && nThreads > 0) {
threadCnt = nThreads;
}
String[] topics = topic.split(",");
for (int i = 0; i < topics.length; i++) {
topicCountMap.put(topics[i], threadCnt);
}
Map<String, List<KafkaStream<byte[], byte[]>>> streams = connector.createMessageStreams(topicCountMap);
List<KafkaStream<byte[], byte[]>> list = new ArrayList<>();
for (String ss : topics) {
list.addAll(streams.get(ss));
}
final ExecutorService executor = Executors.newFixedThreadPool(threadCnt * topics.length);
for (final KafkaStream<byte[], byte[]> kafkaStream : list) {
executor.submit(() -> {
ConsumerIterator<byte[], byte[]> it = kafkaStream.iterator();
while (it.hasNext()) {
MessageAndMetadata<byte[], byte[]> item = it.next();
byte[] message = item.message();
try {
processMessage(item.topic(),message);
} catch (Exception e) {
log.error(e.getMessage());
}
}
});
}
Runtime.getRuntime().addShutdownHook(new Thread(executor::shutdown));
}
public void destroy() {
if (null != connector)
connector.shutdown();
}
public ConsumerConfig getConsumerConfig() {
return consumerConfig;
}
public void setConsumerConfig(ConsumerConfig consumerConfig) {
this.consumerConfig = consumerConfig;
}
public String getTopic() {
return topic;
}
public void setTopic(String topic) {
this.topic = topic.trim().replaceAll(" ", "");
}
public Integer getnThreads() {
return nThreads;
}
public void setnThreads(Integer nThreads) {
this.nThreads = nThreads;
}
}
package cn.com.glsx.smart.service;
import cn.com.glsx.smart.commons.Constants;
import cn.com.glsx.smart.entity.MessageVo;
import cn.com.glsx.smart.entity.SmartTemplateParam;
import cn.com.glsx.smart.mapper.SmartTemplateParamMapper;
import cn.com.glsx.smart.utils.HttpUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhouhaibao
* @date 2021/3/12 16:38
*/
@Service
@Slf4j
public class OrderIssueService {
@Autowired
private SmartTemplateParamMapper smartTemplateParamMapper;
@Value("${orderIssueurl}")
private String orderIssueurl;
/**
* 处理消息
*
* @param data
*/
public void processMessage(String data) {
MessageVo messageVo = JSONObject.parseObject(data, MessageVo.class);
List<SmartTemplateParam> smartTemplateParamList=smartTemplateParamMapper.findByTemplateId(messageVo.getTemplateId());
// 下发指令
List<SmartTemplateParam> orders = smartTemplateParamList.stream().filter(index -> index.getParamKey().equals(Constants.Order_Issue)).collect(Collectors.toList());
orders.forEach(index->{
Map<String,Map<String,String>> ordermaps=new HashMap<>();
Map<String,String> ordermap=new HashMap<>();
List<String> list = JSONObject.parseArray(index.getParamValue(), String.class);
ordermap.put("code",list.get(1));
ordermap.put("value",list.get(2));
ordermaps.put("commands",ordermap);
try {
JSONObject jsonObject = HttpUtil.sendPost(orderIssueurl.replace("{device_id}", list.get(0)), JSONObject.toJSONString(ordermaps), null);
if(jsonObject.get("success").equals("true")){
log.info("设备{}下发指令成功",list.get(0));
}
} catch (IOException e) {
e.printStackTrace();
}
});
// 推送消息----- TODO
List<SmartTemplateParam> messageOrders = smartTemplateParamList.stream().filter(index -> index.getParamKey().equals(Constants.MESSAGE_NOTI)).collect(Collectors.toList());
}
}
package cn.com.glsx.smart.utils;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.time.DateFormatUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.http.Consts;
import org.apache.http.HttpEntity;
import org.apache.http.HttpEntityEnclosingRequest;
import org.apache.http.HttpRequest;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.NoHttpResponseException;
import org.apache.http.ParseException;
import org.apache.http.StatusLine;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.HttpDelete;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.client.utils.HttpClientUtils;
import org.apache.http.config.Registry;
import org.apache.http.config.RegistryBuilder;
import org.apache.http.config.SocketConfig;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.socket.ConnectionSocketFactory;
import org.apache.http.conn.socket.LayeredConnectionSocketFactory;
import org.apache.http.conn.socket.PlainConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.EntityUtils;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLException;
import javax.net.ssl.SSLHandshakeException;
import javax.xml.ws.http.HTTPException;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.UnknownHostException;
import java.nio.charset.Charset;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class HttpUtil {
private static final Log logger = LogFactory.getLog(HttpUtil.class);
final static int CONNECTION_TIMEOUT = 10000; // 设置请求超时 10 秒钟 根据业务调整
final static int SOCKET_TIMEOUT = 180000; // 数据传输时间 3 分钟
final static int SEARCH_CONNECTION_TIMEOUT = 500; // 连接不够用的时候等待超时时间,不设置默认等于 CONNECTION_TIMEOUT
public final static ContentType JSON_UTF8 = ContentType.create("application/json", "utf-8");
static PoolingHttpClientConnectionManager httpClientConnectionManager = null;
static {
LayeredConnectionSocketFactory sslsf = null;
try {
sslsf = new SSLConnectionSocketFactory(SSLContext.getDefault());
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
}
Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create().register("https", sslsf)
.register("http", new PlainConnectionSocketFactory()).build();
httpClientConnectionManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
httpClientConnectionManager.setMaxTotal(200); // 总的连接池的大小
httpClientConnectionManager.setDefaultMaxPerRoute(20); // 对每个主机的最大连接大小,每个主机最大20 个连接,总共 200 个连接,支持 10 台主机
}
public static CloseableHttpClient getHttpClient() {
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(CONNECTION_TIMEOUT).setSocketTimeout(SOCKET_TIMEOUT)
.setConnectionRequestTimeout(SEARCH_CONNECTION_TIMEOUT).build();
SocketConfig socketConfig = SocketConfig.custom()
.setSoKeepAlive(true)
.setTcpNoDelay(true).build();
// 请求重试处理
HttpRequestRetryHandler httpRequestRetryHandler = new HttpRequestRetryHandler() {
@Override
public boolean retryRequest(IOException exception, int executionCount, HttpContext context) {
if (executionCount >= 3) {// 如果已经重试了 3 次,就放弃
return false;
}
if (exception instanceof NoHttpResponseException) {// 如果服务器丢掉了连接,那么就重试
return true;
}
if (exception instanceof SSLHandshakeException) {// 不要重试SSL握手异常
return false;
}
if (exception instanceof InterruptedIOException) {// 超时
return false;
}
if (exception instanceof UnknownHostException) {// 目标服务器不可达
return false;
}
if (exception instanceof ConnectTimeoutException) {// 连接被拒绝
return false;
}
if (exception instanceof SSLException) {// SSL握手异常
return false;
}
HttpClientContext clientContext = HttpClientContext.adapt(context);
HttpRequest request = clientContext.getRequest();
// 如果请求是幂等的,就再次尝试
if (!(request instanceof HttpEntityEnclosingRequest)) {
return true;
}
return false;
}
};
CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(httpClientConnectionManager)
.setDefaultRequestConfig(requestConfig)
.setRetryHandler(httpRequestRetryHandler)
.setDefaultSocketConfig(socketConfig).build();
return httpClient;
}
/**
* 作者:sanri <br/>
* 时间:2017-7-26下午3:47:02<br/>
* 功能:将 map 型 的参数转换为NameValuePair 类型 <br/>
*
* @param params 注:日期将会转格式为 yyyy-MM-dd
* @return
*/
public static List<NameValuePair> transferParam(Map<String, ? extends Object> params) {
return transferParam(params, "yyyy-MM-dd");
}
public static List<NameValuePair> transferParam(Map<String, ? extends Object> params, String dateFormat) {
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
if (params != null && !params.isEmpty()) {
Set<?> entrySet = params.entrySet();
Iterator<?> paramIterator = entrySet.iterator();
while (paramIterator.hasNext()) {
Map.Entry<String, ? extends Object> param = (Map.Entry<String, ? extends Object>) paramIterator.next();
Object value = param.getValue();
if (value == null) {
nameValuePairs.add(new BasicNameValuePair(param.getKey(), null));
} else {
if (value instanceof Date) {
Date date = (Date) value;
String dateString = "";
if (StringUtils.isBlank(dateFormat)) {
dateString = date.toString();
} else {
dateString = DateFormatUtils.format(date, dateFormat);
}
nameValuePairs.add(new BasicNameValuePair(param.getKey(), dateString));
continue;
}
nameValuePairs.add(new BasicNameValuePair(param.getKey(), ObjectUtils.toString(value)));
}
}
}
return nameValuePairs;
}
/**
* http发送post请求
*
* @param url
* @return
* @throws IOException
*/
public static JSONObject sendPost(String url, String json, Map<String, String> headerParams) throws IOException {
String formData = postData(url, json, headerParams);
if (StringUtils.isNotBlank(formData)) {
return JSONObject.parseObject(formData);
}
return new JSONObject();
}
/**
* 作者:sanri <br/>
* 时间:2017-10-19下午2:25:40<br/>
* 功能:向指定 url 提交数据 <br/>
*
* @param url
* @param data
* @return
* @throws IOException
*/
public static String postData(String url, String data, Map<String, String> headerParams) throws IOException, HTTPException {
HttpClient httpClient = getHttpClient();
//请求头,请求体数据封装
HttpPost postMethod = new HttpPost(url);
postMethod.addHeader("Content-Type", "application/json");
if (!headerParams.isEmpty()) {
headerParams.forEach((key, value) -> {
postMethod.addHeader(key, value);
});
}
postMethod.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0");
StringEntity dataEntity = new StringEntity(data, JSON_UTF8);
postMethod.setEntity(dataEntity);
HttpResponse response = null;
try {
//开始请求,记录请求数据和请求时间
response = httpClient.execute(postMethod);
//获取响应
HttpEntity entity = response.getEntity();
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode != 200) {
HTTPException exception = new HTTPException(statusCode);
logger.error("请求地址" + url + "出错,http 状态码为:" + statusCode, exception);
throw exception;
}
String retData = EntityUtils.toString(entity, JSON_UTF8.getCharset());
return retData;
} catch (ClientProtocolException e) {
throw new IllegalArgumentException("客户端协议错误 ,检查 url 配置 url: " + url, e);
} finally {
HttpClientUtils.closeQuietly(response);
}
}
/**
* 作者:sanri <br/>
* 时间:2017-10-19下午2:25:40<br/>
* 功能:向指定 url 提交数据 <br/>
*
* @param url
* @param data
* @return
* @throws IOException
*/
public static String putData(String url, String data, Map<String, String> headerParams) throws IOException, HTTPException {
HttpClient httpClient = getHttpClient();
//请求头,请求体数据封装
HttpPut postMethod = new HttpPut(url);
postMethod.addHeader("Content-Type", "application/json");
if (!headerParams.isEmpty()) {
headerParams.forEach((key, value) -> {
postMethod.addHeader(key, value);
});
}
postMethod.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0");
StringEntity dataEntity = new StringEntity(data, JSON_UTF8);
postMethod.setEntity(dataEntity);
HttpResponse response = null;
try {
//开始请求,记录请求数据和请求时间
response = httpClient.execute(postMethod);
//获取响应
HttpEntity entity = response.getEntity();
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode != 200) {
HTTPException exception = new HTTPException(statusCode);
logger.error("请求地址" + url + "出错,http 状态码为:" + statusCode, exception);
throw exception;
}
String retData = EntityUtils.toString(entity, JSON_UTF8.getCharset());
return retData;
} catch (ClientProtocolException e) {
throw new IllegalArgumentException("客户端协议错误 ,检查 url 配置 url: " + url, e);
} finally {
HttpClientUtils.closeQuietly(response);
}
}
/**
* 作者:sanri <br/>
* 时间:2017-10-19下午2:25:40<br/>
* 功能:向指定 url 提交数据 <br/>
*
* @param url
* @return
* @throws IOException
*/
public static String deleteData(String url, Map<String, String> headerParams) throws IOException, HTTPException {
HttpClient httpClient = getHttpClient();
//请求头,请求体数据封装
HttpDelete httpDelete = new HttpDelete(url);
httpDelete.addHeader("Content-Type", "application/json");
if (!headerParams.isEmpty()) {
headerParams.forEach((key, value) -> {
httpDelete.addHeader(key, value);
});
}
httpDelete.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0");
HttpResponse response = null;
try {
//开始请求,记录请求数据和请求时间
response = httpClient.execute(httpDelete);
//获取响应
HttpEntity entity = response.getEntity();
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode != 200) {
HTTPException exception = new HTTPException(statusCode);
logger.error("请求地址" + url + "出错,http 状态码为:" + statusCode, exception);
throw exception;
}
String retData = EntityUtils.toString(entity, JSON_UTF8.getCharset());
return retData;
} catch (ClientProtocolException e) {
throw new IllegalArgumentException("客户端协议错误 ,检查 url 配置 url: " + url, e);
} finally {
HttpClientUtils.closeQuietly(response);
}
}
/**
* 作者:sanri <br/>
* 时间:2018-3-28下午8:57:50<br/>
* 功能: 请求地址获取数据<br/>
*
* @param url
* @param urlEncoded
* @return
* @throws IOException
* @throws ParseException
*/
public static String getData(final String url, final String urlEncoded, Map<String, String> headerParams) throws IOException {
HttpClient httpClient = getHttpClient();
String queryUrl = url;
if (StringUtils.isNotBlank(urlEncoded)) {
queryUrl += "?" + urlEncoded;
}
HttpGet httpGet = new HttpGet(queryUrl);
if (!headerParams.isEmpty()) {
headerParams.forEach((key, value) -> {
httpGet.addHeader(key, value);
});
}
httpGet.addHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0");
HttpResponse response = null;
try {
response = httpClient.execute(httpGet);
StatusLine statusLine = response.getStatusLine();
int statusCode = statusLine.getStatusCode();
if (statusCode != 200) {
HTTPException exception = new HTTPException(statusCode);
logger.error("请求地址" + url + "出错,http 状态码为:" + statusCode, exception);
throw exception;
}
HttpEntity msgEntity = response.getEntity();
String message = EntityUtils.toString(msgEntity);
return message;
} catch (ClientProtocolException e) {
throw new IllegalArgumentException("客户端协议错误 ,检查 url 配置 url: " + url, e);
} finally {
HttpClientUtils.closeQuietly(response);
}
}
/**
* 作者:sanri <br/>
* 时间:2017-7-26下午3:36:40<br/>
* 功能:兼容以前的功能,传入路径和参数,返回字符串的返回结果 <br/>
*
* @param url
* @param params
* @return
* @throws IOException
*/
public static String getData(String url, Map<String, String> params, Charset charset, Map<String, String> headerParams) throws IOException {
List<NameValuePair> nameValuePairs = transferParam(params);
HttpEntity urlEncodedFormEntity = new UrlEncodedFormEntity(nameValuePairs, charset);
String urlEncoded = EntityUtils.toString(urlEncodedFormEntity, charset);
String data = getData(url, urlEncoded, headerParams);
return data;
}
/**
* http发送get请求
*
* @param url
* @param params
* @param headerParams
* @return
* @throws IOException
*/
public static JSONObject sendGet(String url, Map<String, String> params, Map<String, String> headerParams) throws IOException {
String retData = getData(url, params, Consts.UTF_8, headerParams);
if (StringUtils.isNotBlank(retData)) {
return JSONObject.parseObject(retData);
}
return new JSONObject();
}
/**
* http的put方法
*
* @param url 请求url
* @param json 请求body
* @param headerParams 请求参数
* @return
* @throws IOException
*/
public static JSONObject sendPut(String url, String json, Map<String, String> headerParams) throws IOException {
String formData = putData(url, json, headerParams);
if (StringUtils.isNotBlank(formData)) {
return JSONObject.parseObject(formData);
}
return new JSONObject();
}
/**
* http发送delete请求
*
* @param url url
* @param headerParams 请求参数
* @return
* @throws IOException
*/
public static JSONObject sendDelete(String url,Map<String, String> headerParams) throws IOException {
String retData = deleteData(url,headerParams);
if (StringUtils.isNotBlank(retData)) {
return JSONObject.parseObject(retData);
}
return new JSONObject();
}
}
\ No newline at end of file \ No newline at end of file
#项目名称
spring.application.name=glsx-smart-device-kafka-consumer
#日志路径(logback-spring.xml读取,不要加入配置中心)
logging.path=/data/java_log/jetty/${spring.application.name}/${spring.application.name}.log
#nacos配置中心
spring.cloud.nacos.config.server-addr=192.168.0.63:8848
#nacos配置id,完整dataId=${spring.cloud.nacos.config.prefix}-${spring.profiles.active}.${file-extension(由新增配置时选的文件类型决定)}
#示例:http://192.168.0.63:8848/nacos/v1/cs/configs?dataId=glsx-rest-admin.properties&group=DEV_GROUP
spring.cloud.nacos.config.group=DEV_GROUP
spring.cloud.nacos.config.prefix=${spring.application.name}
#配置开发环境
spring.profiles.active=dev
#配置格式
spring.cloud.nacos.config.file-extension=properties
#微服务sentinel、zipkin、actuator等公共配置
spring.cloud.nacos.config.shared-configs[0].data-id=glsx-rest-microservice-share.properties
spring.cloud.nacos.config.shared-configs[0].group=DEV_GROUP
spring.cloud.nacos.config.shared-configs[0].refresh=true
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE generatorConfiguration PUBLIC
"-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN"
"http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<!-- 配置生成器 -->
<generatorConfiguration>
<!--classPathEntry:数据库的JDBC驱动,换成你自己的驱动位置 可选 -->
<!-- <classPathEntry location="F://jdbc//mysql-connector-java-8.0.18.jar"/>-->
<!-- 一个数据库一个context -->
<context id="DB2Tables" targetRuntime="Mybatis3">
<!-- 自动识别数据库关键字,默认false,如果设置为true,根据SqlReservedWords中定义的关键字列表;一般保留默认值,遇到数据库关键字(Java关键字),使用columnOverride覆盖 -->
<property name="autoDelimitKeywords" value="true"/>
<!-- 生成的Java文件的编码 -->
<property name="javaFileEncoding" value="utf-8"/>
<!-- beginningDelimiter和endingDelimiter:指明数据库的用于标记数据库对象名的符号,比如ORACLE就是双引号,MYSQL默认是`反引号; -->
<property name="beginningDelimiter" value="`"/>
<property name="endingDelimiter" value="`"/>
<!-- 格式化java代码 -->
<property name="javaFormatter" value="org.mybatis.generator.api.dom.DefaultJavaFormatter"/>
<!-- 格式化XML代码 -->
<property name="xmlFormatter" value="org.mybatis.generator.api.dom.DefaultXmlFormatter"/>
<plugin type="org.mybatis.generator.plugins.SerializablePlugin"/>
<plugin type="org.mybatis.generator.plugins.ToStringPlugin"/>
<!-- 配置 tk.mybatis 插件 -->
<plugin type="tk.mybatis.mapper.generator.MapperPlugin">
<property name="mappers" value="com.glsx.plat.mybatis.mapper.CommonBaseMapper"/>
</plugin>
<!--配置生成注释信息,最多配置一个 -->
<commentGenerator>
<!-- 阻止生成注释包含时间戳 默认为false -->
<property name="suppressDate" value="true"/>
<!-- 注释是否添加数据库表的备注信息 默认为false -->
<property name="addRemarkComments" value="true"/>
</commentGenerator>
<!-- jdbc连接-->
<jdbcConnection driverClass="com.mysql.cj.jdbc.Driver"
connectionURL="jdbc:mysql://192.168.3.227:3306/cyb_os?serverTimeZone=Shanghai&amp;useUnicode=true&amp;characterEncoding=utf8&amp;useSSL=false"
userId="dev_admin"
password="1f7e1ed2">
<!--防止生成其他库同名表-->
<property name="nullCatalogMeansCurrent" value="true"/>
</jdbcConnection>
<!-- 类型转换 -->
<javaTypeResolver>
<!-- 是否使用bigDecimal, false可自动转化以下类型(Long, Integer, Short, etc.) -->
<property name="forceBigDecimals" value="false"/>
</javaTypeResolver>
<!-- 生成实体类地址 -->
<javaModelGenerator targetPackage="cn.com.glsx.smart.entity" targetProject="src/main/java">
<!-- 是否让schema作为包的后缀 -->
<property name="enableSubPackages" value="true"/>
<!-- 从数据库返回的值去掉前后空格 -->
<property name="trimStrings" value="true"/>
</javaModelGenerator>
<!-- 生成mapper.xml文件存放地址 -->
<sqlMapGenerator targetPackage="mapper" targetProject="src/main/resources">
<property name="enableSubPackages" value="true"/>
</sqlMapGenerator>
<!-- 生成接口dao type="ANNOTATEDMAPPER",生成Java Model 和基于注解的Mapper对象 type="MIXEDMAPPER",生成基于注解的Java Model 和相应的Mapper对象 type="XMLMAPPER",生成SQLMap XML文件和独立的Mapper接口 -->
<javaClientGenerator targetPackage="cn.com.glsx.smart.mapper" targetProject="src/main/java" type="XMLMAPPER">
<property name="enableSubPackages" value="false"/>
</javaClientGenerator>
<!-- table可以有多个,每个数据库中的表都可以写一个table,tableName表示要匹配的数据库表,也可以在tableName属性中通过使用%通配符来匹配所有数据库表,只有匹配的表才会自动生成文件 enableSelectByPrimaryKey相应的配置表示是否生成相应的接口 -->
<table tableName="smart_template_param" domainObjectName="SmartTemplateParam" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
enableSelectByExample="false" selectByExampleQueryId="false"/>
</context>
</generatorConfiguration>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
<!-- consumer config -->
<!---->
<bean id="consumerProperties"
class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="properties">
<props>
<prop key="zookeeper.connect">${assign.zookeeper.connect}</prop>
<prop key="zookeeper.connection.timeout.ms">${assign.zookeeper.connect.timeout.ms}</prop>
<prop key="zookeeper.session.timeout.ms">${assign.zookeeper.session.timeout.ms}</prop>
<prop key="group.id">${assign.group.id}</prop>
<prop key="auto.commit.interval.ms">${auto.commit.interval.ms}</prop>
<prop key="auto.offset.reset">${auto.offset.reset}</prop>
<prop key="rebalance.backoff.ms">${assign.rebalance.backoff.ms}</prop>
<prop key="rebalance.max.retries">${assign.rebalance.max.retries}</prop>
</props>
</property>
</bean>
<bean id="consumerConfig" class="kafka.consumer.ConsumerConfig">
<constructor-arg index="0" ref="consumerProperties" />
</bean>
</beans>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">
<bean id="orderIssueConsumer" class="cn.com.glsx.smart.queue.OrderIssueConsumer"
init-method="init" destroy-method="destroy">
<property name="consumerConfig" ref="consumerConfig" />
<property name="topic" value="${topic.orderIssueConsumer}" />
<property name="nThreads" value="${consumer.nThreads}" />
</bean>
</beans>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.glsx.smart.mapper.SmartDevideStatusMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.smart.entity.SmartDevideStatus">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="INTEGER" property="id" />
<result column="device_id" jdbcType="VARCHAR" property="deviceId" />
<result column="device_order_code" jdbcType="VARCHAR" property="deviceOrderCode" />
<result column="device_order_value" jdbcType="VARCHAR" property="deviceOrderValue" />
<result column="createtime" jdbcType="TIMESTAMP" property="createtime" />
<result column="updatetime" jdbcType="TIMESTAMP" property="updatetime" />
<result column="product_key" jdbcType="VARCHAR" property="productKey" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, device_id, device_order_code, device_order_value, createtime, updatetime, product_key
</sql>
</mapper>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.com.glsx.smart.mapper.SmartTemplateParamMapper">
<resultMap id="BaseResultMap" type="cn.com.glsx.smart.entity.SmartTemplateParam">
<!--
WARNING - @mbg.generated
-->
<id column="id" jdbcType="BIGINT" property="id" />
<result column="template_id" jdbcType="BIGINT" property="templateId" />
<result column="type" jdbcType="TINYINT" property="type" />
<result column="sort" jdbcType="TINYINT" property="sort" />
<result column="param_key" jdbcType="VARCHAR" property="paramKey" />
<result column="param_value" jdbcType="VARCHAR" property="paramValue" />
</resultMap>
<sql id="Base_Column_List">
<!--
WARNING - @mbg.generated
-->
id, template_id, `type`, sort, param_key, param_value
</sql>
<select id="findByTemplateId" resultType="cn.com.glsx.smart.entity.SmartTemplateParam">
select * from smart_template_param where template_id=#{templateId}
</select>
</mapper>
\ No newline at end of file \ No newline at end of file
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/classes
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' classes/system.properties | tr -d '\r'`
LOGS_FILE=`sed '/dubbo.log4j.file/!d;s/.*=//' classes/system.properties | tr -d '\r'`
if [ -z "$SERVER_NAME" ]; then
SERVER_NAME=`hostname`
fi
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$CONF_DIR" |awk '{print $2}'`
if [ -z "$PIDS" ]; then
echo "ERROR: The $SERVER_NAME does not started!"
exit 1
fi
LOGS_DIR=""
if [ -n "$LOGS_FILE" ]; then
LOGS_DIR=`dirname $LOGS_FILE`
else
LOGS_DIR=$DEPLOY_DIR/logs
fi
if [ ! -d $LOGS_DIR ]; then
mkdir $LOGS_DIR
fi
DUMP_DIR=$LOGS_DIR/dump
if [ ! -d $DUMP_DIR ]; then
mkdir $DUMP_DIR
fi
DUMP_DATE=`date +%Y%m%d%H%M%S`
DATE_DIR=$DUMP_DIR/$DUMP_DATE
if [ ! -d $DATE_DIR ]; then
mkdir $DATE_DIR
fi
echo -e "Dumping the $SERVER_NAME ...\c"
for PID in $PIDS ; do
jstack $PID > $DATE_DIR/jstack-$PID.dump 2>&1
echo -e ".\c"
jinfo $PID > $DATE_DIR/jinfo-$PID.dump 2>&1
echo -e ".\c"
jstat -gcutil $PID > $DATE_DIR/jstat-gcutil-$PID.dump 2>&1
echo -e ".\c"
jstat -gccapacity $PID > $DATE_DIR/jstat-gccapacity-$PID.dump 2>&1
echo -e ".\c"
jmap $PID > $DATE_DIR/jmap-$PID.dump 2>&1
echo -e ".\c"
jmap -heap $PID > $DATE_DIR/jmap-heap-$PID.dump 2>&1
echo -e ".\c"
jmap -histo $PID > $DATE_DIR/jmap-histo-$PID.dump 2>&1
echo -e ".\c"
if [ -r /usr/sbin/lsof ]; then
/usr/sbin/lsof -p $PID > $DATE_DIR/lsof-$PID.dump
echo -e ".\c"
fi
done
if [ -r /bin/netstat ]; then
/bin/netstat -an > $DATE_DIR/netstat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/iostat ]; then
/usr/bin/iostat > $DATE_DIR/iostat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/mpstat ]; then
/usr/bin/mpstat > $DATE_DIR/mpstat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/vmstat ]; then
/usr/bin/vmstat > $DATE_DIR/vmstat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/free ]; then
/usr/bin/free -t > $DATE_DIR/free.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/sar ]; then
/usr/bin/sar > $DATE_DIR/sar.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/uptime ]; then
/usr/bin/uptime > $DATE_DIR/uptime.dump 2>&1
echo -e ".\c"
fi
echo "OK!"
echo "DUMP: $DATE_DIR"
#!/bin/bash
ENV=$1
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
cd `dirname $0`
./stop.sh
./start.sh $ENV
\ No newline at end of file \ No newline at end of file
#!/bin/bash
cd `dirname $0`
if [ "$1" = "start" ]; then
ENV=$2
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
./start.sh $ENV
else
if [ "$1" = "stop" ]; then
./stop.sh
else
if [ "$1" = "debug" ]; then
ENV=$2
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
./start.sh $ENV debug
else
if [ "$1" = "restart" ]; then
ENV=$2
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
./restart.sh $ENV
else
if [ "$1" = "dump" ]; then
./dump.sh
else
echo "ERROR: Please input argument: start or stop or debug or restart or dump"
exit 1
fi
fi
fi
fi
fi
#!/bin/bash
JAVA_HOME="/app/soft/jdk1.8"
JAVA_MEM_OPTS=" -server -Xmx1024m -Xms512m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
ENV=$1
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/classes
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' classes/system.properties | tr -d '\r'`
SERVER_PORT=`sed '/dubbo.service.port/!d;s/.*=//' classes/system.properties | tr -d '\r'`
LOGS_FILE=`sed '/dubbo.log4j.file/!d;s/.*=//' classes/log4j.properties | tr -d '\r'`
if [ -z "$SERVER_NAME" ]; then
SERVER_NAME=`hostname`
fi
echo "server name is $SERVER_NAME"
echo "server port is $SERVER_PORT"
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$CONF_DIR" |awk '{print $2}'`
if [ -n "$PIDS" ]; then
echo "ERROR: The $SERVER_NAME already started!"
echo "PID: $PIDS"
exit 1
fi
if [ -n "$SERVER_PORT" ]; then
SERVER_PORT_COUNT=`netstat -tln | grep $SERVER_PORT | wc -l`
if [ $SERVER_PORT_COUNT -gt 0 ]; then
echo "ERROR: The $SERVER_NAME port $SERVER_PORT already used!"
exit 1
fi
fi
LOGS_DIR=""
if [ -n "$LOGS_FILE" ]; then
LOGS_DIR=`dirname $LOGS_FILE`
else
LOGS_DIR=$DEPLOY_DIR/logs
fi
if [ ! -d $LOGS_DIR ]; then
mkdir $LOGS_DIR
fi
STDOUT_FILE=$LOGS_DIR/stdout.log
LIB_DIR=$DEPLOY_DIR/lib
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true "
JAVA_DEBUG_OPTS=""
if [ "$2" = "debug" ]; then
JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
fi
JAVA_JMX_OPTS=""
if [ "$2" = "jmx" ]; then
JAVA_JMX_OPTS=" -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
fi
echo -e "Starting the $SERVER_NAME ...\c"
nohup $JAVA_HOME/bin/java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS $JAVA_JMX_OPTS -classpath $CONF_DIR:$LIB_JARS Application env=$ENV > $STDOUT_FILE 2>&1 &
COUNT=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
if [ -n "$SERVER_PORT" ]; then
COUNT=`echo status | nc 127.0.0.1 $SERVER_PORT -i 1 | grep -c OK`
else
COUNT=`ps --no-heading -C java -f --width 1000 | grep "$DEPLOY_DIR" | awk '{print $2}' | wc -l`
fi
if [ $COUNT -gt 0 ]; then
break
fi
done
echo "OK!"
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$DEPLOY_DIR" | awk '{print $2}'`
echo "PID: $PIDS"
echo "STDOUT: $STDOUT_FILE"
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/classes
SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' classes/system.properties | tr -d '\r'`
if [ -z "$SERVER_NAME" ]; then
SERVER_NAME=`hostname`
fi
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$CONF_DIR" |awk '{print $2}'`
if [ -z "$PIDS" ]; then
echo "ERROR: The $SERVER_NAME does not started!"
exit 1
fi
if [ "$1" != "skip" ]; then
$BIN_DIR/dump.sh
fi
echo -e "Stopping the $SERVER_NAME ...\c"
for PID in $PIDS ; do
kill $PID > /dev/null 2>&1
done
COUNT=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
COUNT=1
for PID in $PIDS ; do
PID_EXIST=`ps --no-heading -p $PID`
if [ -n "$PID_EXIST" ]; then
COUNT=0
break
fi
done
done
echo "OK!"
echo "PID: $PIDS"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!