上传完整代码
This commit is contained in:
parent
b66b02b146
commit
02e384a41f
208
cf-chat/cf-chat-api/cf-chat-api.iml
Normal file
208
cf-chat/cf-chat-api/cf-chat-api.iml
Normal file
@ -0,0 +1,208 @@
|
||||
<?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="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</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="module" module-name="cf-chat-interface" />
|
||||
<orderEntry type="module" module-name="cf-chat-domain" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.7.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:24.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" 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: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.31.Final" level="project" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-auth" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-interface" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-domain" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-dao" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-security:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-security:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.13.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.feign:feign-okhttp:8.18.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.feign:feign-core:8.18.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jvnet:animal-sniffer-annotation:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.40" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
|
||||
<orderEntry type="module" module-name="cf-framework-common" />
|
||||
<orderEntry type="module" module-name="cf-framework-model" />
|
||||
<orderEntry type="module" module-name="cf-framework-utils" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.lingala.zip4j:zip4j:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-mock:2.0.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: logkit:logkit:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: avalon-framework:avalon-framework:4.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:core:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jai-imageio:jai-imageio-core:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-oauth2:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security.oauth:spring-security-oauth2:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.1.RELEASE" 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.apache.logging.log4j:log4j-to-slf4j:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-starter:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-autoconfigure:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-autoconfigure-compatible:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:0.9.94" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.yetus:audience-annotations:0.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.1.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" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" 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" scope="TEST" name="Maven: org.springframework:spring-test:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
|
||||
</component>
|
||||
</module>
|
91
cf-chat/cf-chat-api/pom.xml
Normal file
91
cf-chat/cf-chat-api/pom.xml
Normal file
@ -0,0 +1,91 @@
|
||||
<?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>
|
||||
<artifactId>cf-framework-parent</artifactId>
|
||||
<groupId>com.cf</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../cf-framework-parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-chat-api</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-chat-interface</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-ucenter-auth</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-framework-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.springframework.cloud</groupId>-->
|
||||
<!-- <artifactId>spring-cloud-starter-security</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-oauth2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Zookeeper dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-dependencies-zookeeper</artifactId>
|
||||
<type>pom</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,71 @@
|
||||
package com.cf.chat.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
|
||||
import org.springframework.security.oauth2.provider.token.TokenStore;
|
||||
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
|
||||
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @version 1.0
|
||||
**/
|
||||
@Configuration
|
||||
@EnableResourceServer
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)//激活方法上的PreAuthorize注解
|
||||
public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
|
||||
|
||||
//公钥
|
||||
private static final String PUBLIC_KEY = "publickey.txt";
|
||||
|
||||
//定义JwtTokenStore,使用jwt令牌
|
||||
@Bean
|
||||
public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) {
|
||||
return new JwtTokenStore(jwtAccessTokenConverter);
|
||||
}
|
||||
|
||||
//定义JJwtAccessTokenConverter,使用jwt令牌
|
||||
@Bean
|
||||
public JwtAccessTokenConverter jwtAccessTokenConverter() {
|
||||
JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
|
||||
converter.setVerifierKey(getPubKey());
|
||||
return converter;
|
||||
}
|
||||
/**
|
||||
* 获取非对称加密公钥 Key
|
||||
* @return 公钥 Key
|
||||
*/
|
||||
private String getPubKey() {
|
||||
Resource resource = new ClassPathResource(PUBLIC_KEY);
|
||||
try {
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(resource.getInputStream());
|
||||
BufferedReader br = new BufferedReader(inputStreamReader);
|
||||
return br.lines().collect(Collectors.joining("\n"));
|
||||
} catch (IOException ioe) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//Http安全配置,对每个到达系统的http请求链接进行校验
|
||||
@Override
|
||||
public void configure(HttpSecurity http) throws Exception {
|
||||
//所有请求必须认证通过
|
||||
http.authorizeRequests()
|
||||
//下边的路径放行
|
||||
.antMatchers("/v2/api-docs", "/swagger-resources/configuration/ui",
|
||||
"/swagger-resources","/swagger-resources/configuration/security",
|
||||
"/swagger-ui.html","/webjars/**","/course/coursepic/list/**","/login",
|
||||
"/ucenter/register").permitAll()
|
||||
.anyRequest().authenticated();
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.cf.chat.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
//
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class Swagger2Configuration {
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.cf.chat"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("才风网api文档")
|
||||
.description("才风网api文档")
|
||||
// .termsOfServiceUrl("/")
|
||||
.version("1.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-chat-api
|
||||
server.port=8086
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
#dubbo.scan.base-packages=com.cf.manager.controller
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
## dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
#dubbo.protocol.name=dubbo
|
||||
#dubbo.protocol.port=2181
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
15
cf-chat/cf-chat-api/src/main/resources/log4j.properties
Normal file
15
cf-chat/cf-chat-api/src/main/resources/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
1
cf-chat/cf-chat-api/src/main/resources/publickey.txt
Normal file
1
cf-chat/cf-chat-api/src/main/resources/publickey.txt
Normal file
@ -0,0 +1 @@
|
||||
-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnASXh9oSvLRLxk901HANYM6KcYMzX8vFPnH/To2R+SrUVw1O9rEX6m1+rIaMzrEKPm12qPjVq3HMXDbRdUaJEXsB7NgGrAhepYAdJnYMizdltLdGsbfyjITUCOvzZ/QgM1M4INPMD+Ce859xse06jnOkCUzinZmasxrmgNV3Db1GtpyHIiGVUY0lSO1Frr9m5dpemylaT0BV3UwTQWVW9ljm6yR3dBncOdDENumT5tGbaDVyClV0FEB1XdSKd7VjiDCDbUAUbDTG1fm3K9sx7kO1uMGElbXLgMfboJ963HEJcU01km7BmFntqI5liyKheX+HBUCD4zbYNPw236U+7QIDAQAB-----END PUBLIC KEY-----
|
17
cf-chat/cf-chat-api/target/classes/application.properties
Normal file
17
cf-chat/cf-chat-api/target/classes/application.properties
Normal file
@ -0,0 +1,17 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-chat-api
|
||||
server.port=8086
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
#dubbo.scan.base-packages=com.cf.manager.controller
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
## dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
#dubbo.protocol.name=dubbo
|
||||
#dubbo.protocol.port=2181
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
15
cf-chat/cf-chat-api/target/classes/log4j.properties
Normal file
15
cf-chat/cf-chat-api/target/classes/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
1
cf-chat/cf-chat-api/target/classes/publickey.txt
Normal file
1
cf-chat/cf-chat-api/target/classes/publickey.txt
Normal file
@ -0,0 +1 @@
|
||||
-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnASXh9oSvLRLxk901HANYM6KcYMzX8vFPnH/To2R+SrUVw1O9rEX6m1+rIaMzrEKPm12qPjVq3HMXDbRdUaJEXsB7NgGrAhepYAdJnYMizdltLdGsbfyjITUCOvzZ/QgM1M4INPMD+Ce859xse06jnOkCUzinZmasxrmgNV3Db1GtpyHIiGVUY0lSO1Frr9m5dpemylaT0BV3UwTQWVW9ljm6yR3dBncOdDENumT5tGbaDVyClV0FEB1XdSKd7VjiDCDbUAUbDTG1fm3K9sx7kO1uMGElbXLgMfboJ963HEJcU01km7BmFntqI5liyKheX+HBUCD4zbYNPw236U+7QIDAQAB-----END PUBLIC KEY-----
|
84
cf-chat/cf-chat-dao/cf-chat-dao.iml
Normal file
84
cf-chat/cf-chat-dao/cf-chat-dao.iml
Normal file
@ -0,0 +1,84 @@
|
||||
<?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="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="module" module-name="cf-chat-domain" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.7.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:24.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" 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: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-mongodb:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.1.RELEASE" 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.apache.logging.log4j:log4j-to-slf4j:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:bson:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.40" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.16" level="project" />
|
||||
</component>
|
||||
</module>
|
60
cf-chat/cf-chat-dao/pom.xml
Normal file
60
cf-chat/cf-chat-dao/pom.xml
Normal file
@ -0,0 +1,60 @@
|
||||
<?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>
|
||||
<artifactId>cf-framework-parent</artifactId>
|
||||
<groupId>com.cf</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../cf-framework-parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cf-chat-dao</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-chat-domain</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-amqp</artifactId>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.0.1</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper -->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper</artifactId>
|
||||
<version>5.1.8</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.github.jsqlparser/jsqlparser -->
|
||||
<dependency>
|
||||
<groupId>com.github.jsqlparser</groupId>
|
||||
<artifactId>jsqlparser</artifactId>
|
||||
<version>2.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/mysql/mysql-connector-java -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.1.16</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,17 @@
|
||||
package com.cf.chat.dao.repository;
|
||||
|
||||
|
||||
import com.cf.chat.domain.CfUserGroupMessage;
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CfUserGroupMessageRepository extends MongoRepository<CfUserGroupMessage,String> {
|
||||
|
||||
List<CfUserGroupMessage> queryCfUserGroupMessagesByUidEqualsAndStatusEquals(String to_uid, Integer status, Pageable pageable);
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
package com.cf.chat.dao.repository;
|
||||
|
||||
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.mongodb.repository.MongoRepository;
|
||||
import org.springframework.data.mongodb.repository.Query;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CfUserMessageRepository extends MongoRepository<CfUserMessage,String> {
|
||||
|
||||
List<CfUserMessage> queryCfUserMessagesByToUidEqualsAndStatusEquals(String to_uid, Integer status, Pageable pageable);
|
||||
}
|
30
cf-chat/cf-chat-dao/src/main/resources/application.yml
Normal file
30
cf-chat/cf-chat-dao/src/main/resources/application.yml
Normal file
@ -0,0 +1,30 @@
|
||||
#默认使用配置
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
datasource:
|
||||
name: caifeng
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://139.9.155.149:3306/caifeng?characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
|
||||
username: caifeng
|
||||
password: 这填您的数据库密码
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
data:
|
||||
mongodb:
|
||||
uri: mongodb://mongodb数据库的用户名:mongodb的密码@139.9.155.149:27017/?authSource=caifeng
|
||||
database: caifeng
|
||||
# redis:
|
||||
# host: 139.9.155.149
|
||||
# port: 6379
|
||||
# pass:
|
||||
# database: 0
|
||||
# maxIdle: 300
|
||||
# maxWait: 3000
|
||||
# testOnBorrow: true
|
||||
|
||||
#公共配置与profiles选择无关
|
||||
mybatis:
|
||||
# mapperScanPackage: com.cf.mapper
|
||||
# typeAliasesPackage: com.cf.pojo
|
||||
mapperLocations: classpath:com.cf.chat.dao.mapper/*.xml
|
||||
configLocation: classpath:config/SqlMapConfig.xml
|
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<plugins>
|
||||
<!-- com.github.pagehelper 为 PageHelper 类所在包名 -->
|
||||
<plugin interceptor="com.github.pagehelper.PageInterceptor">
|
||||
<!-- 设置数据库类型 Oracle,Mysql,MariaDB,SQLite,Hsqldb,PostgreSQL 六种数据库-->
|
||||
<!-- 4.0.0以后版本可以不设置该参数 -->
|
||||
<!-- <property name="dialect" value="mysql"/>-->
|
||||
</plugin>
|
||||
</plugins>
|
||||
</configuration>
|
BIN
cf-chat/cf-chat-dao/target/cf-chat-dao.jar
Normal file
BIN
cf-chat/cf-chat-dao/target/cf-chat-dao.jar
Normal file
Binary file not shown.
30
cf-chat/cf-chat-dao/target/classes/application.yml
Normal file
30
cf-chat/cf-chat-dao/target/classes/application.yml
Normal file
@ -0,0 +1,30 @@
|
||||
#默认使用配置
|
||||
spring:
|
||||
profiles:
|
||||
active: dev
|
||||
datasource:
|
||||
name: caifeng
|
||||
type: com.alibaba.druid.pool.DruidDataSource
|
||||
url: jdbc:mysql://139.9.155.149:3306/caifeng?characterEncoding=utf-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
|
||||
username: caifeng
|
||||
password: pNrApiSx5Ti2iPNF
|
||||
driver-class-name: com.mysql.jdbc.Driver
|
||||
data:
|
||||
mongodb:
|
||||
uri: mongodb://caifeng:caifEng666@139.9.155.149:27017/?authSource=caifeng
|
||||
database: caifeng
|
||||
# redis:
|
||||
# host: 139.9.155.149
|
||||
# port: 6379
|
||||
# pass:
|
||||
# database: 0
|
||||
# maxIdle: 300
|
||||
# maxWait: 3000
|
||||
# testOnBorrow: true
|
||||
|
||||
#公共配置与profiles选择无关
|
||||
mybatis:
|
||||
# mapperScanPackage: com.cf.mapper
|
||||
# typeAliasesPackage: com.cf.pojo
|
||||
mapperLocations: classpath:com.cf.chat.dao.mapper/*.xml
|
||||
configLocation: classpath:config/SqlMapConfig.xml
|
Binary file not shown.
Binary file not shown.
12
cf-chat/cf-chat-dao/target/classes/config/SqlMapConfig.xml
Normal file
12
cf-chat/cf-chat-dao/target/classes/config/SqlMapConfig.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<plugins>
|
||||
<!-- com.github.pagehelper 为 PageHelper 类所在包名 -->
|
||||
<plugin interceptor="com.github.pagehelper.PageInterceptor">
|
||||
<!-- 设置数据库类型 Oracle,Mysql,MariaDB,SQLite,Hsqldb,PostgreSQL 六种数据库-->
|
||||
<!-- 4.0.0以后版本可以不设置该参数 -->
|
||||
<!-- <property name="dialect" value="mysql"/>-->
|
||||
</plugin>
|
||||
</plugins>
|
||||
</configuration>
|
5
cf-chat/cf-chat-dao/target/maven-archiver/pom.properties
Normal file
5
cf-chat/cf-chat-dao/target/maven-archiver/pom.properties
Normal file
@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Sun Apr 19 11:06:23 CST 2020
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=com.cf
|
||||
artifactId=cf-chat-dao
|
@ -0,0 +1,2 @@
|
||||
com\cf\chat\dao\repository\CfUserGroupMessageRepository.class
|
||||
com\cf\chat\dao\repository\CfUserMessageRepository.class
|
@ -0,0 +1,2 @@
|
||||
G:\java\cf\cf-chat\cf-chat-dao\src\main\java\com\cf\chat\dao\repository\CfUserMessageRepository.java
|
||||
G:\java\cf\cf-chat\cf-chat-dao\src\main\java\com\cf\chat\dao\repository\CfUserGroupMessageRepository.java
|
48
cf-chat/cf-chat-domain/cf-chat-domain.iml
Normal file
48
cf-chat/cf-chat-domain/cf-chat-domain.iml
Normal file
@ -0,0 +1,48 @@
|
||||
<?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="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" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:1.13.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:1.10.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.0.12.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.18.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:24.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" 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: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
</component>
|
||||
</module>
|
69
cf-chat/cf-chat-domain/pom.xml
Normal file
69
cf-chat/cf-chat-domain/pom.xml
Normal file
@ -0,0 +1,69 @@
|
||||
<?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>
|
||||
<artifactId>cf-framework-parent</artifactId>
|
||||
<groupId>com.cf</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../cf-framework-parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cf-chat-domain</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-commons -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
<version>1.13.9.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.data/spring-data-mongodb -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-mongodb</artifactId>
|
||||
<version>1.10.9.RELEASE</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>5.0.12.Final</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||
</dependency>-->
|
||||
<!--<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-elasticsearch</artifactId>
|
||||
</dependency>-->
|
||||
|
||||
<!-- <dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||
</dependency>-->
|
||||
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>24.0-jre</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,25 @@
|
||||
package com.cf.chat.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Document(collection = "cf_chat_group_message")
|
||||
public class CfUserGroupMessage implements Serializable {
|
||||
@Id
|
||||
private String id;
|
||||
private String uid;
|
||||
private String groupId;
|
||||
private String messageId;
|
||||
private Integer status; //状态(0-未读/1-已读/2-已撤回)
|
||||
private Long createTime;
|
||||
}
|
@ -0,0 +1,42 @@
|
||||
package com.cf.chat.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: mrt.
|
||||
* @Description:
|
||||
* @Date:Created in 2018/1/24 10:04.
|
||||
* @Modified By:
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Document(collection = "cf_chat_message")
|
||||
public class CfUserMessage implements Serializable {
|
||||
/**
|
||||
* 页面名称、别名、访问地址、类型(静态/动态)、页面模版、状态
|
||||
*/
|
||||
@Id
|
||||
private String id;
|
||||
private String fromUid;
|
||||
private String toUid;
|
||||
private String groupId;
|
||||
private Integer status;
|
||||
private String contents;
|
||||
private Integer type;
|
||||
private String client;
|
||||
private String ip;
|
||||
private Long createTime;
|
||||
private Long receiveTime;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.cf.chat.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.ToString;
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* @Author: mrt.
|
||||
* @Description:
|
||||
* @Date:Created in 2018/1/24 10:04.
|
||||
* @Modified By:
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class CfUserMessageVo implements Serializable {
|
||||
/**
|
||||
* 页面名称、别名、访问地址、类型(静态/动态)、页面模版、状态
|
||||
*/
|
||||
@Id
|
||||
private String id;
|
||||
private String fromUid;
|
||||
private String toUid;
|
||||
private String groupId;
|
||||
private Integer status;
|
||||
private String contents;
|
||||
private Integer type;
|
||||
private String client;
|
||||
private String ip;
|
||||
private Integer createTime;
|
||||
private Integer receiveTime;
|
||||
private Integer page;
|
||||
private Integer limit;
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.cf.chat.domain;
|
||||
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Message implements Serializable {
|
||||
private String type; // 消息类型(尝试连接/正常发包/心跳等)
|
||||
private CfUserMessage cfUserMessage; // 聊天消息
|
||||
private Object ext; // 扩展消息字段
|
||||
private String token; //创建会话链接时需要传入
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public CfUserMessage getCfUserMessage() {
|
||||
return cfUserMessage;
|
||||
}
|
||||
|
||||
public void setCfUserMessage(CfUserMessage cfUserMessage) {
|
||||
this.cfUserMessage = cfUserMessage;
|
||||
}
|
||||
|
||||
public Object getExt() {
|
||||
return ext;
|
||||
}
|
||||
|
||||
public void setExt(Object ext) {
|
||||
this.ext = ext;
|
||||
}
|
||||
|
||||
public String getToken() {
|
||||
return token;
|
||||
}
|
||||
|
||||
public void setToken(String token) {
|
||||
this.token = token;
|
||||
}
|
||||
}
|
BIN
cf-chat/cf-chat-domain/target/cf-chat-domain.jar
Normal file
BIN
cf-chat/cf-chat-domain/target/cf-chat-domain.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Sun Apr 19 11:06:17 CST 2020
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=com.cf
|
||||
artifactId=cf-chat-domain
|
@ -0,0 +1,4 @@
|
||||
com\cf\chat\domain\Message.class
|
||||
com\cf\chat\domain\CfUserMessage.class
|
||||
com\cf\chat\domain\CfUserGroupMessage.class
|
||||
com\cf\chat\domain\CfUserMessageVo.class
|
@ -0,0 +1,4 @@
|
||||
G:\java\cf\cf-chat\cf-chat-domain\src\main\java\com\cf\chat\domain\CfUserMessageVo.java
|
||||
G:\java\cf\cf-chat\cf-chat-domain\src\main\java\com\cf\chat\domain\CfUserGroupMessage.java
|
||||
G:\java\cf\cf-chat\cf-chat-domain\src\main\java\com\cf\chat\domain\Message.java
|
||||
G:\java\cf\cf-chat\cf-chat-domain\src\main\java\com\cf\chat\domain\CfUserMessage.java
|
125
cf-chat/cf-chat-interface/cf-chat-interface.iml
Normal file
125
cf-chat/cf-chat-interface/cf-chat-interface.iml
Normal file
@ -0,0 +1,125 @@
|
||||
<?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="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</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" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="cf-framework-common" />
|
||||
<orderEntry type="module" module-name="cf-framework-model" />
|
||||
<orderEntry type="module" module-name="cf-framework-utils" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.13.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.1.RELEASE" 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.apache.logging.log4j:log4j-to-slf4j:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.lingala.zip4j:zip4j:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.8.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-mock:2.0.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: log4j:log4j:1.2.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: logkit:logkit:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: avalon-framework:avalon-framework:4.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:core:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jai-imageio:jai-imageio-core:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="module" module-name="cf-chat-domain" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.7.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.1-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:24.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" 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: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.32.Final" level="project" />
|
||||
</component>
|
||||
</module>
|
39
cf-chat/cf-chat-interface/pom.xml
Normal file
39
cf-chat/cf-chat-interface/pom.xml
Normal file
@ -0,0 +1,39 @@
|
||||
<?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>
|
||||
<artifactId>cf-framework-parent</artifactId>
|
||||
<groupId>com.cf</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../cf-framework-parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cf-chat-interface</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-framework-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>javassist</artifactId>
|
||||
<groupId>org.javassist</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-chat-domain</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/io.netty/netty-all -->
|
||||
<dependency>
|
||||
<groupId>io.netty</groupId>
|
||||
<artifactId>netty-all</artifactId>
|
||||
<version>4.1.32.Final</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
@ -0,0 +1,37 @@
|
||||
package com.cf.chat.service;
|
||||
|
||||
import com.cf.chat.domain.CfUserGroupMessage;
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import com.cf.chat.domain.CfUserMessageVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface CfUserGroupMessageService {
|
||||
/**
|
||||
* 获取指定用用户未读群消息(支持分页获取)
|
||||
* @param uid
|
||||
* @param page
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
public List<CfUserGroupMessage> selectNotReadGroupMessageListByToUid(String uid, Integer page, Integer limit);
|
||||
|
||||
/**
|
||||
* 将群消息发送给群成员(除了发送者自己)
|
||||
* @param cfUserMessage
|
||||
*/
|
||||
public void sendGroupMessageByChannel(CfUserMessage cfUserMessage);
|
||||
|
||||
/**
|
||||
* 根据id串批量更新数据状态
|
||||
* @param cfUserGroupMessages
|
||||
*/
|
||||
public void batchUpdateStatusByIds(List<CfUserGroupMessage> cfUserGroupMessages);
|
||||
|
||||
/**
|
||||
* 获取离线消息
|
||||
*
|
||||
* @param uid
|
||||
*/
|
||||
public void getNotReadMessage(String uid);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.cf.chat.service;
|
||||
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import com.cf.chat.domain.CfUserMessageVo;
|
||||
import com.cf.chat.domain.Message;
|
||||
import com.cf.framework.domain.ucenter.ext.UserBasicInfo;
|
||||
import io.netty.channel.Channel;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 请在此填写描述
|
||||
*
|
||||
* @ClassName CfUserMessageService
|
||||
* @Author 隔壁小王子 981011512@qq.com
|
||||
* @Date 2019/12/15/015 12:44
|
||||
* @Version 1.0
|
||||
**/
|
||||
public interface CfUserMessageService {
|
||||
|
||||
/**
|
||||
* 发送用户消息
|
||||
* @param cfUserMessage
|
||||
* @return
|
||||
*/
|
||||
public CfUserMessage sendMessage(CfUserMessage cfUserMessage);
|
||||
|
||||
/**
|
||||
* 给通道塞入消息
|
||||
* @param cfUserMessage
|
||||
*/
|
||||
public void sendMessageByChannel(CfUserMessage cfUserMessage);
|
||||
|
||||
/**
|
||||
* 通知发送者消息发送结果
|
||||
*
|
||||
* @param cfUserMessage
|
||||
*/
|
||||
public void sendMessageResultByChannel(CfUserMessage cfUserMessage);
|
||||
|
||||
/**
|
||||
* 改变消息状态
|
||||
* @param uid
|
||||
* @param messageId
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
public Long updateStatus(String uid, String messageId, Integer status);
|
||||
|
||||
/**
|
||||
* 检查token是否合法
|
||||
* @param jwtString
|
||||
* @return
|
||||
*/
|
||||
public String checkToken(String jwtString);
|
||||
|
||||
/**
|
||||
* 获取指定用的未读消息(支持分页获取)
|
||||
* @param uid
|
||||
* @param page
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
public List<CfUserMessage> selectNotReadMessageListByToUid(String uid, Integer page, Integer limit);
|
||||
|
||||
/**
|
||||
* 根据消息id组查询消息数据
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
public List<CfUserMessage> selectListByIds(String[] ids);
|
||||
|
||||
/**
|
||||
* 根据token获取用户基本信息
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
public UserBasicInfo getBaseUserInfoByToken(String token);
|
||||
|
||||
/**
|
||||
* 获取离线消息
|
||||
* @param uid
|
||||
*/
|
||||
public void getNotReadMessage(String uid);
|
||||
|
||||
/**
|
||||
* 批量更新消息状态
|
||||
* @param cfUserMessages
|
||||
*/
|
||||
public void batchUpdateStatusByIds(List<CfUserMessage> cfUserMessages);
|
||||
}
|
BIN
cf-chat/cf-chat-interface/target/cf-chat-interface.jar
Normal file
BIN
cf-chat/cf-chat-interface/target/cf-chat-interface.jar
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Sun Apr 19 11:06:29 CST 2020
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=com.cf
|
||||
artifactId=cf-chat-interface
|
@ -0,0 +1,2 @@
|
||||
com\cf\chat\service\CfUserGroupMessageService.class
|
||||
com\cf\chat\service\CfUserMessageService.class
|
@ -0,0 +1,2 @@
|
||||
G:\java\cf\cf-chat\cf-chat-interface\src\main\java\com\cf\chat\service\CfUserMessageService.java
|
||||
G:\java\cf\cf-chat\cf-chat-interface\src\main\java\com\cf\chat\service\CfUserGroupMessageService.java
|
223
cf-chat/cf-chat-service/cf-chat-service.iml
Normal file
223
cf-chat/cf-chat-service/cf-chat-service.iml
Normal file
@ -0,0 +1,223 @@
|
||||
<?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="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
<sourceRoots>
|
||||
<root url="file://$MODULE_DIR$/src/main/java" />
|
||||
<root url="file://$MODULE_DIR$/src/main/resources" />
|
||||
</sourceRoots>
|
||||
</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" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="cf-chat-interface" />
|
||||
<orderEntry type="module" module-name="cf-chat-domain" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.7.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:24.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" 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: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.31.Final" level="project" />
|
||||
<orderEntry type="module" module-name="cf-chat-dao" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-mongodb:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:bson:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.40" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.6" level="project" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-auth" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-interface" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-domain" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-dao" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.1.RELEASE" 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.apache.logging.log4j:log4j-to-slf4j:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-security:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-security:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.13.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-oauth2:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security.oauth:spring-security-oauth2:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.feign:feign-okhttp:8.18.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.feign:feign-core:8.18.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jvnet:animal-sniffer-annotation:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="module" module-name="cf-framework-common" />
|
||||
<orderEntry type="module" module-name="cf-framework-model" />
|
||||
<orderEntry type="module" module-name="cf-framework-utils" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.lingala.zip4j:zip4j:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-mock:2.0.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: logkit:logkit:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: avalon-framework:avalon-framework:4.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:core:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jai-imageio:jai-imageio-core:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-starter:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-autoconfigure:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-autoconfigure-compatible:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:0.9.94" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.yetus:audience-annotations:0.5.0" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.1.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" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" 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.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework:spring-test:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
|
||||
</component>
|
||||
</module>
|
95
cf-chat/cf-chat-service/pom.xml
Normal file
95
cf-chat/cf-chat-service/pom.xml
Normal file
@ -0,0 +1,95 @@
|
||||
<?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>
|
||||
<artifactId>cf-framework-parent</artifactId>
|
||||
<groupId>com.cf</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../cf-framework-parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cf-chat-service</artifactId>
|
||||
<dependencies>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.cf</groupId>-->
|
||||
<!-- <artifactId>cf-chat-domain</artifactId>-->
|
||||
<!-- <version>1.0-SNAPSHOT</version>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-chat-interface</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-chat-dao</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-ucenter-auth</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-framework-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jsr305</artifactId>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>javassist</artifactId>
|
||||
<groupId>org.javassist</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<!-- Dubbo Spring Boot Starter -->
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||
<version>2.7.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-dependencies-zookeeper</artifactId>
|
||||
<type>pom</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,49 @@
|
||||
package com.cf.chat;
|
||||
|
||||
import com.cf.chat.netty.WebSocketServer;
|
||||
import com.cf.framework.utils.SpringUtil;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
/**
|
||||
* 请在此填写描述
|
||||
*
|
||||
* @ClassName ChatApplication
|
||||
* @Author 隔壁小王子 981011512@qq.com
|
||||
* @Date 2019/11/21/021 23:17
|
||||
* @Version 1.0
|
||||
**/
|
||||
@EnableAutoConfiguration()
|
||||
@ComponentScan(basePackages = {"com.cf.chat.service","com.cf.chat.netty","com.cf.chat.dao","com.cf.framework"})
|
||||
@MapperScan("com.cf.chat.dao.mapper")
|
||||
public class ChatApplication implements CommandLineRunner {
|
||||
|
||||
//将springutils交由spring进行管理
|
||||
@Bean
|
||||
public SpringUtil getSpringUtil(){
|
||||
return new SpringUtil();
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ChatApplication.class, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* 【注意事项】:若netty服务启动失败时请删除下面两个方法,同时删除本类对CommandLineRunner的实现,因为当前
|
||||
* 整合dubbo无法启动Listener才作此处理的
|
||||
*/
|
||||
|
||||
@Autowired
|
||||
private WebSocketServer websocketServer;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
this.websocketServer.start();
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package com.cf.chat.netty;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import com.cf.chat.domain.Message;
|
||||
import com.cf.chat.service.CfUserGroupMessageService;
|
||||
import com.cf.chat.service.CfUserMessageService;
|
||||
import com.cf.framework.domain.message.response.MessageCode;
|
||||
import com.cf.framework.domain.ucenter.ext.UserBasicInfo;
|
||||
import com.cf.framework.domain.ucenter.response.AuthCode;
|
||||
import com.cf.framework.exception.ExceptionCast;
|
||||
import com.cf.framework.utils.SpringUtil;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.SimpleChannelInboundHandler;
|
||||
import io.netty.channel.group.ChannelGroup;
|
||||
import io.netty.channel.group.DefaultChannelGroup;
|
||||
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
|
||||
import io.netty.util.concurrent.GlobalEventExecutor;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.SocketAddress;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
||||
/**
|
||||
* 处理消息的handler
|
||||
* TextWebSocketFrame: 在netty中,是用于为websocket专门处理文本的对象,frame是消息的载体
|
||||
*/
|
||||
public class ChatHandler extends SimpleChannelInboundHandler<TextWebSocketFrame> {
|
||||
|
||||
// 用来保存所有的客户端连接
|
||||
private static ChannelGroup clients = new DefaultChannelGroup(GlobalEventExecutor.INSTANCE);
|
||||
private SimpleDateFormat sdf = new SimpleDateFormat("yyyy-mm-dd hh:MM");
|
||||
|
||||
// 当Channel中有新的事件消息会自动调用
|
||||
protected void channelRead0(ChannelHandlerContext ctx, TextWebSocketFrame msg) throws Exception {
|
||||
// 当接收到数据后会自动调用
|
||||
|
||||
// 获取客户端发送过来的文本消息
|
||||
Message message = JSON.parseObject(msg.text(), Message.class);
|
||||
|
||||
// 通过SpringUtil工具类获取Spring上下文容器
|
||||
CfUserMessageService cfUserMessageService = SpringUtil.getBean(CfUserMessageService.class);
|
||||
CfUserGroupMessageService cfUserGroupMessageService = SpringUtil.getBean(CfUserGroupMessageService.class);
|
||||
UserBasicInfo userBasicInfo = cfUserMessageService.getBaseUserInfoByToken(message.getToken());
|
||||
switch (message.getType()) {
|
||||
case "create_link":
|
||||
UserChannelMap.put(userBasicInfo.getId(), ctx.channel());
|
||||
UserChannelMap.print();
|
||||
Thread messageThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
cfUserMessageService.getNotReadMessage(userBasicInfo.getId());
|
||||
}
|
||||
});
|
||||
messageThread.start();
|
||||
Thread groupMessageThread = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
cfUserGroupMessageService.getNotReadMessage(userBasicInfo.getId());
|
||||
}
|
||||
});
|
||||
groupMessageThread.start();
|
||||
break;
|
||||
case "send_message":
|
||||
CfUserMessage _message = message.getCfUserMessage();
|
||||
_message.setFromUid(userBasicInfo.getId());
|
||||
SocketAddress socketAddress = ctx.channel().remoteAddress();
|
||||
String ip = socketAddress.toString();
|
||||
ip = ip.substring(1,ip.indexOf(":"));
|
||||
_message.setIp(ip);
|
||||
cfUserMessageService.sendMessage(_message);
|
||||
break;
|
||||
case "change_status":
|
||||
cfUserMessageService.updateStatus(userBasicInfo.getId(),
|
||||
message.getCfUserMessage().getId(),1);
|
||||
break;
|
||||
case "heartbeat_check":
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 当有新的客户端连接服务器之后,会自动调用这个方法
|
||||
@Override
|
||||
public void handlerAdded(ChannelHandlerContext ctx) throws Exception {
|
||||
// 将新的通道加入到clients
|
||||
clients.add(ctx.channel());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
|
||||
UserChannelMap.removeByChannelId(ctx.channel().id().asLongText());
|
||||
ctx.channel().close();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
|
||||
System.out.println("关闭通道");
|
||||
UserChannelMap.removeByChannelId(ctx.channel().id().asLongText());
|
||||
UserChannelMap.print();
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.cf.chat.netty;
|
||||
|
||||
import io.netty.channel.ChannelHandlerContext;
|
||||
import io.netty.channel.ChannelInboundHandlerAdapter;
|
||||
import io.netty.handler.timeout.IdleState;
|
||||
import io.netty.handler.timeout.IdleStateEvent;
|
||||
|
||||
public class HearBeatHandler extends ChannelInboundHandlerAdapter {
|
||||
|
||||
@Override
|
||||
public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
|
||||
if(evt instanceof IdleStateEvent) {
|
||||
IdleStateEvent idleStateEvent = (IdleStateEvent)evt;
|
||||
|
||||
if(idleStateEvent.state() == IdleState.READER_IDLE) {
|
||||
// System.out.println("读空闲事件触发...");
|
||||
}
|
||||
else if(idleStateEvent.state() == IdleState.WRITER_IDLE) {
|
||||
// System.out.println("写空闲事件触发...");
|
||||
}
|
||||
else if(idleStateEvent.state() == IdleState.ALL_IDLE) {
|
||||
System.out.println("---------------");
|
||||
// System.out.println("读写空闲事件触发");
|
||||
System.out.println("关闭通道资源");
|
||||
ctx.channel().close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.cf.chat.netty;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class NettyListener implements ApplicationListener<ContextRefreshedEvent> {
|
||||
|
||||
@Autowired
|
||||
private WebSocketServer websocketServer;
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(ContextRefreshedEvent event) {
|
||||
if(event.getApplicationContext().getParent() == null) {
|
||||
try {
|
||||
websocketServer.start();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.cf.chat.netty;
|
||||
|
||||
import io.netty.channel.Channel;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 建立用户ID与通道的关联
|
||||
*/
|
||||
public class UserChannelMap {
|
||||
// 用户保存用户id与通道的Map对象
|
||||
private static Map<String, Channel> userChannelMap;
|
||||
|
||||
static {
|
||||
userChannelMap = new HashMap<String, Channel>();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加用户id与channel的关联
|
||||
* @param userid
|
||||
* @param channel
|
||||
*/
|
||||
public static void put(String userid, Channel channel) {
|
||||
userChannelMap.put(userid, channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户id移除用户id与channel的关联
|
||||
* @param userid
|
||||
*/
|
||||
public static void remove(String userid) {
|
||||
userChannelMap.remove(userid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据通道id移除用户与channel的关联
|
||||
* @param channelId 通道的id
|
||||
*/
|
||||
public static void removeByChannelId(String channelId) {
|
||||
if(!StringUtils.isNotBlank(channelId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (String s : userChannelMap.keySet()) {
|
||||
Channel channel = userChannelMap.get(s);
|
||||
if(channelId.equals(channel.id().asLongText())) {
|
||||
System.out.println("客户端连接断开,取消用户" + s + "与通道" + channelId + "的关联");
|
||||
userChannelMap.remove(s);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 打印所有的用户与通道的关联数据
|
||||
public static void print() {
|
||||
for (String s : userChannelMap.keySet()) {
|
||||
System.out.println("用户id:" + s + " 通道:" + userChannelMap.get(s).id());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据好友id获取对应的通道
|
||||
* @param friendid 好友id
|
||||
* @return Netty通道
|
||||
*/
|
||||
public static Channel get(String friendid) {
|
||||
return userChannelMap.get(friendid);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.cf.chat.netty;
|
||||
|
||||
import io.netty.bootstrap.ServerBootstrap;
|
||||
import io.netty.channel.ChannelFuture;
|
||||
import io.netty.channel.EventLoopGroup;
|
||||
import io.netty.channel.nio.NioEventLoopGroup;
|
||||
import io.netty.channel.socket.nio.NioServerSocketChannel;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class WebSocketServer {
|
||||
|
||||
private EventLoopGroup bossGroup; // 主线程池
|
||||
private EventLoopGroup workerGroup; // 工作线程池
|
||||
private ServerBootstrap server; // 服务器
|
||||
private ChannelFuture future; // 回调
|
||||
|
||||
public void start() {
|
||||
future = server.bind(9002);
|
||||
System.out.println("netty server - 启动成功");
|
||||
}
|
||||
|
||||
public WebSocketServer() {
|
||||
bossGroup = new NioEventLoopGroup();
|
||||
workerGroup = new NioEventLoopGroup();
|
||||
|
||||
server = new ServerBootstrap();
|
||||
server.group(bossGroup, workerGroup)
|
||||
.channel(NioServerSocketChannel.class)
|
||||
.childHandler(new WebsocketInitializer());
|
||||
}
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.cf.chat.netty;
|
||||
|
||||
import io.netty.channel.ChannelInitializer;
|
||||
import io.netty.channel.ChannelPipeline;
|
||||
import io.netty.channel.socket.SocketChannel;
|
||||
import io.netty.handler.codec.http.HttpObjectAggregator;
|
||||
import io.netty.handler.codec.http.HttpServerCodec;
|
||||
import io.netty.handler.codec.http.websocketx.WebSocketServerProtocolHandler;
|
||||
import io.netty.handler.stream.ChunkedWriteHandler;
|
||||
import io.netty.handler.timeout.IdleStateHandler;
|
||||
|
||||
public class WebsocketInitializer extends ChannelInitializer<SocketChannel> {
|
||||
@Override
|
||||
protected void initChannel(SocketChannel ch) throws Exception {
|
||||
ChannelPipeline pipeline = ch.pipeline();
|
||||
|
||||
// ------------------
|
||||
// 用于支持Http协议
|
||||
// ------------------
|
||||
|
||||
// websocket基于http协议,需要有http的编解码器
|
||||
pipeline.addLast(new HttpServerCodec());
|
||||
// 对写大数据流的支持
|
||||
pipeline.addLast(new ChunkedWriteHandler());
|
||||
// 添加对HTTP请求和响应的聚合器:只要使用Netty进行Http编程都需要使用
|
||||
// 对HttpMessage进行聚合,聚合成FullHttpRequest或者FullHttpResponse
|
||||
// 在netty编程中都会使用到Handler
|
||||
pipeline.addLast(new HttpObjectAggregator(1024 * 64));
|
||||
|
||||
pipeline.addLast(new WebSocketServerProtocolHandler("/ws"));
|
||||
|
||||
// 添加Netty空闲超时检查的支持
|
||||
// 1. 读空闲超时(超过一定的时间会发送对应的事件消息)
|
||||
// 2. 写空闲超时
|
||||
// 3. 读写空闲超时
|
||||
pipeline.addLast(new IdleStateHandler(4, 8, 12));
|
||||
|
||||
pipeline.addLast(new HearBeatHandler());
|
||||
// 添加自定义的handler
|
||||
pipeline.addLast(new ChatHandler());
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
package com.cf.chat.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cf.chat.dao.repository.CfUserGroupMessageRepository;
|
||||
import com.cf.chat.domain.CfUserGroupMessage;
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import com.cf.chat.domain.CfUserMessageVo;
|
||||
import com.cf.chat.domain.Message;
|
||||
import com.cf.chat.netty.UserChannelMap;
|
||||
import com.cf.chat.service.CfUserGroupMessageService;
|
||||
import com.cf.chat.service.CfUserMessageService;
|
||||
import com.cf.framework.utils.IdWorker;
|
||||
import com.cf.ucenter.domain.CfUserGroupMember;
|
||||
import com.cf.ucenter.service.CfUserGroupService;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.data.mongodb.core.query.Update;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service(version = "1.0.0")
|
||||
@Transactional
|
||||
public class CfUserGroupMessageServiceImpl implements CfUserGroupMessageService {
|
||||
@Autowired
|
||||
private CfUserGroupMessageRepository cfUserGroupMessageRepository;
|
||||
@Autowired
|
||||
private CfUserMessageService cfUserMessageService;
|
||||
@Reference(version = "1.0.0", retries = 0, timeout = 10000)
|
||||
private CfUserGroupService cfUserGroupService;
|
||||
@Autowired
|
||||
private IdWorker idWorker;
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Override
|
||||
public List<CfUserGroupMessage> selectNotReadGroupMessageListByToUid(String uid, Integer page, Integer limit) {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "create_time");
|
||||
Pageable pageable = PageRequest.of(page - 1, limit, sort);
|
||||
return cfUserGroupMessageRepository.queryCfUserGroupMessagesByUidEqualsAndStatusEquals(uid, 0, pageable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendGroupMessageByChannel(CfUserMessage cfUserMessage) {
|
||||
List<CfUserGroupMember> cfUserGroupMembers = cfUserGroupService.getUserGroupMemberByGroupId(cfUserMessage.getGroupId());
|
||||
if(cfUserGroupMembers!=null && cfUserGroupMembers.size()>0){
|
||||
for (CfUserGroupMember cfUserGroupMember: cfUserGroupMembers){
|
||||
cfUserMessage.setToUid(cfUserGroupMember.getUid());
|
||||
if(cfUserGroupMember.getUid().equals(cfUserMessage.getFromUid())){
|
||||
continue; //跳过发送者自己
|
||||
}
|
||||
Channel channel = UserChannelMap.get(cfUserGroupMember.getUid());
|
||||
if(channel != null) {
|
||||
Message message = new Message();
|
||||
message.setType("chat_message");
|
||||
message.setCfUserMessage(cfUserMessage);
|
||||
channel.writeAndFlush(new TextWebSocketFrame(JSON.toJSONString(message)));
|
||||
}else{
|
||||
//记录群成员的离线消息
|
||||
cfUserGroupMessageRepository.insert(new CfUserGroupMessage(idWorker.nextId(),cfUserGroupMember.getUid(),
|
||||
cfUserMessage.getGroupId(),cfUserMessage.getId(),0,System.currentTimeMillis()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateStatusByIds(List<CfUserGroupMessage> cfUserGroupMessages) {
|
||||
Update update = new Update();
|
||||
update.set("status",1);
|
||||
Query query = new Query();
|
||||
List<String> list = new ArrayList<>();
|
||||
cfUserGroupMessages.forEach(item->list.add(item.getId()));
|
||||
query.addCriteria(Criteria.where("_id").in(list));
|
||||
mongoTemplate.updateMulti(query,update,CfUserGroupMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNotReadMessage(String uid) {
|
||||
List<CfUserGroupMessage> cfUserGroupMessages = null;
|
||||
while (true) {
|
||||
cfUserGroupMessages = selectNotReadGroupMessageListByToUid(uid, 1, 30);
|
||||
if (cfUserGroupMessages != null && cfUserGroupMessages.size() > 0) {
|
||||
List<String> ids = new ArrayList<>();
|
||||
Integer index = 0;
|
||||
String[] idArr = new String[cfUserGroupMessages.size()];
|
||||
for (CfUserGroupMessage cfUserGroupMessage : cfUserGroupMessages) {
|
||||
idArr[index] = cfUserGroupMessage.getMessageId();
|
||||
index++;
|
||||
}
|
||||
List<CfUserMessage> cfUserMessages = cfUserMessageService.selectListByIds(idArr);
|
||||
if (cfUserMessages != null && cfUserMessages.size() > 0) {
|
||||
for (CfUserMessage cfUserMessage : cfUserMessages) {
|
||||
cfUserMessage.setToUid(uid);
|
||||
cfUserMessageService.sendMessageByChannel(cfUserMessage);
|
||||
}
|
||||
}
|
||||
batchUpdateStatusByIds(cfUserGroupMessages);
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,173 @@
|
||||
package com.cf.chat.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cf.chat.dao.repository.CfUserMessageRepository;
|
||||
import com.cf.chat.domain.CfUserMessage;
|
||||
import com.cf.chat.domain.Message;
|
||||
import com.cf.chat.netty.UserChannelMap;
|
||||
import com.cf.chat.service.CfUserGroupMessageService;
|
||||
import com.cf.chat.service.CfUserMessageService;
|
||||
import com.cf.framework.domain.message.response.MessageCode;
|
||||
import com.cf.framework.domain.ucenter.ext.UserBasicInfo;
|
||||
import com.cf.framework.domain.ucenter.response.AuthCode;
|
||||
import com.cf.framework.exception.ExceptionCast;
|
||||
import com.cf.framework.utils.IdWorker;
|
||||
import com.cf.ucenter.service.AuthService;
|
||||
import com.mongodb.client.result.UpdateResult;
|
||||
import io.netty.channel.Channel;
|
||||
import io.netty.handler.codec.http.websocketx.TextWebSocketFrame;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.apache.dubbo.config.annotation.Service;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.data.mongodb.core.query.Update;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 请在此填写描述
|
||||
*
|
||||
* @ClassName CfUserMessageServiceImpl
|
||||
* @Author 隔壁小王子 981011512@qq.com
|
||||
* @Date 2019/12/15/015 18:39
|
||||
* @Version 1.0
|
||||
**/
|
||||
@Service(version = "1.0.0")
|
||||
@Transactional
|
||||
public class CfUserMessageServiceImpl implements CfUserMessageService {
|
||||
private String collectionName = "cf_chat_message";
|
||||
|
||||
@Autowired
|
||||
private CfUserMessageRepository cfUserMessageRepository;
|
||||
@Reference(version = "1.0.0", retries = 0, timeout = 10000)
|
||||
private AuthService authService;
|
||||
@Autowired
|
||||
MongoTemplate template;
|
||||
@Autowired
|
||||
private IdWorker idWorker;
|
||||
@Autowired
|
||||
private CfUserGroupMessageService cfUserGroupMessageService;
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Override
|
||||
public CfUserMessage sendMessage(CfUserMessage _cfUserMessage) {
|
||||
_cfUserMessage.setId(idWorker.nextId());
|
||||
_cfUserMessage.setCreateTime(System.currentTimeMillis());
|
||||
_cfUserMessage.setReceiveTime(0L);
|
||||
_cfUserMessage.setStatus(0);
|
||||
CfUserMessage cfUserMessage = cfUserMessageRepository.insert(_cfUserMessage);
|
||||
if(StringUtils.isNotEmpty(cfUserMessage.getGroupId())){
|
||||
cfUserGroupMessageService.sendGroupMessageByChannel(cfUserMessage);
|
||||
}else{
|
||||
sendMessageByChannel(cfUserMessage);
|
||||
}
|
||||
sendMessageResultByChannel(cfUserMessage);
|
||||
return cfUserMessage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessageByChannel(CfUserMessage cfUserMessage) {
|
||||
Channel channel = UserChannelMap.get(cfUserMessage.getToUid());
|
||||
if(channel != null) {
|
||||
Message message = new Message();
|
||||
message.setType("chat_message");
|
||||
message.setCfUserMessage(cfUserMessage);
|
||||
channel.writeAndFlush(new TextWebSocketFrame(JSON.toJSONString(message)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendMessageResultByChannel(CfUserMessage cfUserMessage) {
|
||||
Channel channel = UserChannelMap.get(cfUserMessage.getFromUid());
|
||||
if (channel != null) {
|
||||
Message message = new Message();
|
||||
message.setType("chat_message");
|
||||
message.setCfUserMessage(cfUserMessage);
|
||||
channel.writeAndFlush(new TextWebSocketFrame(JSON.toJSONString(message)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long updateStatus(String uid, String messageId, Integer status) {
|
||||
Optional<CfUserMessage> optional = cfUserMessageRepository.findById(messageId);
|
||||
if(!optional.isPresent()){
|
||||
ExceptionCast.cast(MessageCode.MESSAGE_NOT_EXISTSNAME);
|
||||
}
|
||||
CfUserMessage cfUserMessage = optional.get();
|
||||
if(!cfUserMessage.getToUid().equals(uid)){
|
||||
ExceptionCast.cast(MessageCode.NO_AUTH_UPDATE_MESSAGE);
|
||||
}
|
||||
Query query = new Query();
|
||||
query.addCriteria(Criteria.where("_id").is(messageId));
|
||||
Update update = new Update();
|
||||
update.set("status",status);
|
||||
UpdateResult updateResult = template.updateFirst(query, update, CfUserMessage.class);
|
||||
return updateResult.getModifiedCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String checkToken(String jwtString) {
|
||||
return authService.checkJwtToken(jwtString);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CfUserMessage> selectNotReadMessageListByToUid(String uid, Integer page, Integer limit) {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "create_time");
|
||||
Pageable pageable = PageRequest.of(page - 1, limit, sort);
|
||||
return cfUserMessageRepository.queryCfUserMessagesByToUidEqualsAndStatusEquals(uid, 0, pageable);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CfUserMessage> selectListByIds(String[] ids) {
|
||||
Sort sort = new Sort(Sort.Direction.ASC, "create_time");
|
||||
Criteria criteria = new Criteria();
|
||||
criteria.and("id").in(ids);
|
||||
Query query = new Query(criteria);
|
||||
query.with(sort);
|
||||
return mongoTemplate.find(query, CfUserMessage.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserBasicInfo getBaseUserInfoByToken(String token) {
|
||||
if(token==null || token==""){
|
||||
ExceptionCast.cast(AuthCode.AUTH_LOGIN_TOKEN_ILLEGAL);
|
||||
}
|
||||
String tokenStr = checkToken(token);
|
||||
return JSON.parseObject(tokenStr, UserBasicInfo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getNotReadMessage(String uid) {
|
||||
List<CfUserMessage> cfUserMessages = null;
|
||||
while (true){
|
||||
cfUserMessages = selectNotReadMessageListByToUid(uid, 1, 30);
|
||||
if(cfUserMessages!=null && cfUserMessages.size()>0){
|
||||
cfUserMessages.forEach(item->sendMessageByChannel(item));
|
||||
batchUpdateStatusByIds(cfUserMessages);
|
||||
}else{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void batchUpdateStatusByIds(List<CfUserMessage> cfUserMessages) {
|
||||
Update update = new Update();
|
||||
update.set("status",1);
|
||||
Query query = new Query();
|
||||
List<String> list = new ArrayList<>();
|
||||
cfUserMessages.forEach(item->list.add(item.getId()));
|
||||
query.addCriteria(Criteria.where("_id").in(list));
|
||||
template.updateMulti(query,update,CfUserMessage.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-chat-service
|
||||
|
||||
server.port=8083
|
||||
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
dubbo.scan.base-packages=com.cf.chat.service.impl
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
dubbo.protocol.name=dubbo
|
||||
dubbo.protocol.port=20883
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
||||
#解决抛出的异常被转换的问题(服务提供者才需要配置)
|
||||
dubbo.provider.filter: -exception
|
||||
|
15
cf-chat/cf-chat-service/src/main/resources/log4j.properties
Normal file
15
cf-chat/cf-chat-service/src/main/resources/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
@ -0,0 +1,17 @@
|
||||
package com.cf.chat;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@SpringBootTest(classes = MessageTest.class)
|
||||
@RunWith(SpringRunner.class)
|
||||
public class MessageTest {
|
||||
|
||||
@Test
|
||||
public void test1(){
|
||||
System.out.println("11111");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-chat-service
|
||||
|
||||
server.port=8083
|
||||
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
dubbo.scan.base-packages=com.cf.chat.service.impl
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
dubbo.protocol.name=dubbo
|
||||
dubbo.protocol.port=20883
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
||||
#解决抛出的异常被转换的问题(服务提供者才需要配置)
|
||||
dubbo.provider.filter: -exception
|
||||
|
15
cf-chat/cf-chat-service/src/test/resources/log4j.properties
Normal file
15
cf-chat/cf-chat-service/src/test/resources/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
BIN
cf-chat/cf-chat-service/src/test/resources/xc.keystore
Normal file
BIN
cf-chat/cf-chat-service/src/test/resources/xc.keystore
Normal file
Binary file not shown.
@ -0,0 +1,22 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-chat-service
|
||||
|
||||
server.port=8083
|
||||
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
dubbo.scan.base-packages=com.cf.chat.service.impl
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
dubbo.protocol.name=dubbo
|
||||
dubbo.protocol.port=20883
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
||||
#解决抛出的异常被转换的问题(服务提供者才需要配置)
|
||||
dubbo.provider.filter: -exception
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
15
cf-chat/cf-chat-service/target/classes/log4j.properties
Normal file
15
cf-chat/cf-chat-service/target/classes/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Sun Apr 19 11:06:38 CST 2020
|
||||
version=1.0-SNAPSHOT
|
||||
groupId=com.cf
|
||||
artifactId=cf-chat-service
|
@ -0,0 +1,11 @@
|
||||
com\cf\chat\netty\NettyListener.class
|
||||
com\cf\chat\netty\ChatHandler$1.class
|
||||
com\cf\chat\service\impl\CfUserGroupMessageServiceImpl.class
|
||||
com\cf\chat\ChatApplication.class
|
||||
com\cf\chat\netty\UserChannelMap.class
|
||||
com\cf\chat\netty\WebSocketServer.class
|
||||
com\cf\chat\netty\WebsocketInitializer.class
|
||||
com\cf\chat\netty\HearBeatHandler.class
|
||||
com\cf\chat\netty\ChatHandler.class
|
||||
com\cf\chat\service\impl\CfUserMessageServiceImpl.class
|
||||
com\cf\chat\netty\ChatHandler$2.class
|
@ -0,0 +1,9 @@
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\netty\WebsocketInitializer.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\netty\UserChannelMap.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\netty\NettyListener.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\service\impl\CfUserGroupMessageServiceImpl.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\netty\WebSocketServer.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\netty\HearBeatHandler.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\service\impl\CfUserMessageServiceImpl.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\ChatApplication.java
|
||||
G:\java\cf\cf-chat\cf-chat-service\src\main\java\com\cf\chat\netty\ChatHandler.java
|
@ -0,0 +1,22 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-chat-service
|
||||
|
||||
server.port=8083
|
||||
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
dubbo.scan.base-packages=com.cf.chat.service.impl
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
dubbo.protocol.name=dubbo
|
||||
dubbo.protocol.port=20883
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
||||
#解决抛出的异常被转换的问题(服务提供者才需要配置)
|
||||
dubbo.provider.filter: -exception
|
||||
|
15
cf-chat/cf-chat-service/target/test-classes/log4j.properties
Normal file
15
cf-chat/cf-chat-service/target/test-classes/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
BIN
cf-chat/cf-chat-service/target/test-classes/xc.keystore
Normal file
BIN
cf-chat/cf-chat-service/target/test-classes/xc.keystore
Normal file
Binary file not shown.
223
cf-file/cf-file-api/cf-file-api.iml
Normal file
223
cf-file/cf-file-api/cf-file-api.iml
Normal file
@ -0,0 +1,223 @@
|
||||
<?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="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
<facet type="web" name="Web">
|
||||
<configuration>
|
||||
<webroots />
|
||||
</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="module" module-name="cf-file-interface" />
|
||||
<orderEntry type="module" module-name="cf-file-dao" />
|
||||
<orderEntry type="module" module-name="cf-file-domain" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-mongodb:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongo-java-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.7.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-mongodb:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:bson:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mongodb:mongodb-driver-core:3.8.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-amqp:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-rabbit:2.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.amqp:spring-amqp:2.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.rabbitmq:amqp-client:5.4.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:3.2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:2.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.oschina.zcx7878:fastdfs-client-java:1.27.0.0" level="project" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-auth" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-interface" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-domain" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.1.0.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="module" module-name="cf-chat-interface" />
|
||||
<orderEntry type="module" module-name="cf-chat-domain" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.31.Final" level="project" />
|
||||
<orderEntry type="module" module-name="cf-ucenter-dao" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-security:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:2.0.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.5.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-actuator:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.micrometer:micrometer-core:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hdrhistogram:HdrHistogram:2.1.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.latencyutils:LatencyUtils:2.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-security:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:9.0.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.13.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.31.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okhttp3:okhttp:3.9.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.squareup.okio:okio:1.13.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.netflix.feign:feign-okhttp:8.18.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.netflix.feign:feign-core:8.18.0" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jvnet:animal-sniffer-annotation:1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid-spring-boot-starter:1.1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.40" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-orm:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:druid:1.1.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:24.0-jre" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.findbugs:jsr305:1.3.9" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.checkerframework:checker-compat-qual:2.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.errorprone:error_prone_annotations:2.1.3" 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: com.fasterxml:classmate:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.7.0" level="project" />
|
||||
<orderEntry type="module" module-name="cf-framework-common" />
|
||||
<orderEntry type="module" module-name="cf-framework-model" />
|
||||
<orderEntry type="module" module-name="cf-framework-utils" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.lingala.zip4j:zip4j:1.3.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-mock:2.0.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: logkit:logkit:1.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: avalon-framework:avalon-framework:4.1.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.zxing:core:3.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: com.github.jai-imageio:jai-imageio-core:1.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-security:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-config:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-web:5.1.2.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-oauth2:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure:2.0.0.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security.oauth:spring-security-oauth2:2.2.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-jwt:1.0.9.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.56" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.1.RELEASE" 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.apache.logging.log4j:log4j-to-slf4j:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-starter:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-autoconfigure:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo-spring-boot-autoconfigure-compatible:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo:2.7.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.0.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: jline:jline:0.9.94" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.yetus:audience-annotations:0.5.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.3.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.1.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.1.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" scope="TEST" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.5" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" 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" scope="TEST" name="Maven: org.springframework:spring-test:5.1.3.RELEASE" level="project" />
|
||||
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
|
||||
</component>
|
||||
</module>
|
90
cf-file/cf-file-api/pom.xml
Normal file
90
cf-file/cf-file-api/pom.xml
Normal file
@ -0,0 +1,90 @@
|
||||
<?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>
|
||||
<artifactId>cf-framework-parent</artifactId>
|
||||
<groupId>com.cf</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<relativePath>../../cf-framework-parent/pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>cf-file-api</artifactId>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-file-interface</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-ucenter-auth</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cf</groupId>
|
||||
<artifactId>cf-framework-common</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-oauth2</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Boot dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-spring-boot-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Zookeeper dependencies -->
|
||||
<dependency>
|
||||
<groupId>org.apache.dubbo</groupId>
|
||||
<artifactId>dubbo-dependencies-zookeeper</artifactId>
|
||||
<type>pom</type>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>${project.artifactId}-${project.version}</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,29 @@
|
||||
package com.cf.file.api;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
|
||||
import org.springframework.boot.autoconfigure.web.servlet.MultipartAutoConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* 请在此填写描述
|
||||
*
|
||||
* @ClassName SmsApiApplication
|
||||
* @Author 隔壁小王子 981011512@qq.com
|
||||
* @Date 2019/11/21/021 23:36
|
||||
* @Version 1.0
|
||||
**/
|
||||
@EnableAutoConfiguration(exclude = {MultipartAutoConfiguration.class})
|
||||
@ComponentScan(basePackages = {"com.cf.file.api"})
|
||||
@ComponentScan(basePackages = {"com.cf.framework"}) //扫描common包,因为我们需要在Common中统一捕获异常和其它处理
|
||||
@EnableSwagger2
|
||||
public class FileApiApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(FileApiApplication.class,args);
|
||||
}
|
||||
}
|
@ -0,0 +1,26 @@
|
||||
package com.cf.file.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.cors.CorsConfiguration;
|
||||
import org.springframework.web.cors.UrlBasedCorsConfigurationSource;
|
||||
import org.springframework.web.filter.CorsFilter;
|
||||
|
||||
@Configuration
|
||||
public class CorsConfig {
|
||||
private CorsConfiguration buildConfig() {
|
||||
CorsConfiguration corsConfiguration = new CorsConfiguration();
|
||||
corsConfiguration.addAllowedOrigin("*");
|
||||
corsConfiguration.addAllowedHeader("*");
|
||||
corsConfiguration.addAllowedMethod("*");
|
||||
return corsConfiguration;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public CorsFilter corsFilter() {
|
||||
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
|
||||
// 配置所有请求
|
||||
source.registerCorsConfiguration("/**", buildConfig());
|
||||
return new CorsFilter(source);
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.cf.file.api.config;
|
||||
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.web.multipart.MultipartResolver;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
|
||||
@SpringBootConfiguration
|
||||
public class FileUpLoadConfig {
|
||||
//显示声明CommonsMultipartResolver为mutipartResolver
|
||||
@Bean(name = "multipartResolver")
|
||||
public MultipartResolver multipartResolver() {
|
||||
CommonsMultipartResolver resolver = new CommonsMultipartResolver();
|
||||
resolver.setDefaultEncoding("UTF-8");
|
||||
resolver.setResolveLazily(true);//resolveLazily属性启用是为了推迟文件解析,以在在UploadAction中捕获文件大小异常
|
||||
resolver.setMaxInMemorySize(40960);
|
||||
resolver.setMaxUploadSize(50 * 1024 * 1024);//上传文件大小 50M 50*1024*1024
|
||||
return resolver;
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
package com.cf.file.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
|
||||
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
|
||||
import org.springframework.security.oauth2.provider.token.TokenStore;
|
||||
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
|
||||
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author Administrator
|
||||
* @version 1.0
|
||||
**/
|
||||
@Configuration
|
||||
@EnableResourceServer
|
||||
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)//激活方法上的PreAuthorize注解
|
||||
public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
|
||||
|
||||
//公钥
|
||||
private static final String PUBLIC_KEY = "publickey.txt";
|
||||
|
||||
//定义JwtTokenStore,使用jwt令牌
|
||||
@Bean
|
||||
public TokenStore tokenStore(JwtAccessTokenConverter jwtAccessTokenConverter) {
|
||||
return new JwtTokenStore(jwtAccessTokenConverter);
|
||||
}
|
||||
|
||||
//定义JJwtAccessTokenConverter,使用jwt令牌
|
||||
@Bean
|
||||
public JwtAccessTokenConverter jwtAccessTokenConverter() {
|
||||
JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
|
||||
converter.setVerifierKey(getPubKey());
|
||||
return converter;
|
||||
}
|
||||
/**
|
||||
* 获取非对称加密公钥 Key
|
||||
* @return 公钥 Key
|
||||
*/
|
||||
private String getPubKey() {
|
||||
Resource resource = new ClassPathResource(PUBLIC_KEY);
|
||||
try {
|
||||
InputStreamReader inputStreamReader = new InputStreamReader(resource.getInputStream());
|
||||
BufferedReader br = new BufferedReader(inputStreamReader);
|
||||
return br.lines().collect(Collectors.joining("\n"));
|
||||
} catch (IOException ioe) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
//Http安全配置,对每个到达系统的http请求链接进行校验
|
||||
@Override
|
||||
public void configure(HttpSecurity http) throws Exception {
|
||||
//所有请求必须认证通过
|
||||
http.authorizeRequests()
|
||||
//下边的路径放行
|
||||
.antMatchers("/v2/api-docs", "/swagger-resources/configuration/ui",
|
||||
"/swagger-resources","/swagger-resources/configuration/security",
|
||||
"/swagger-ui.html", "/webjars/**", "/file/upload").permitAll()
|
||||
.anyRequest().authenticated().and()
|
||||
.cors()
|
||||
.and()
|
||||
.csrf().disable()
|
||||
;
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.cf.file.api.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
//
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class Swagger2Configuration {
|
||||
@Bean
|
||||
public Docket createRestApi() {
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.cf.file"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("才风网api文档")
|
||||
.description("才风网api文档")
|
||||
// .termsOfServiceUrl("/")
|
||||
.version("1.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package com.cf.file.api.controller;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.cf.framework.domain.ucenter.ext.UserBasicInfo;
|
||||
import com.cf.framework.utils.HttpHearderUtils;
|
||||
import com.cf.ucenter.service.AuthService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
public class BaseController {
|
||||
@Autowired
|
||||
protected HttpServletRequest request;
|
||||
protected UserBasicInfo userBasicInfo;
|
||||
|
||||
/**
|
||||
* 解析jwt令牌,获取基础的用户信息
|
||||
* @param authService
|
||||
*/
|
||||
protected void getUserBasicInfoByJwt(AuthService authService)
|
||||
{
|
||||
//取到jwt令牌
|
||||
String jwt = HttpHearderUtils.getAuthorization(request);
|
||||
String jwtToken = authService.checkJwtToken(jwt);
|
||||
userBasicInfo = JSON.parseObject(jwtToken, UserBasicInfo.class);
|
||||
}
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.cf.file.api.controller;
|
||||
|
||||
import com.cf.file.api.swagger.FileSwagger;
|
||||
import com.cf.file.service.FileSystemService;
|
||||
import com.cf.framework.domain.file.response.FileSystemCode;
|
||||
import com.cf.framework.domain.response.ResponseResult;
|
||||
import com.cf.framework.exception.ExceptionCast;
|
||||
import org.apache.dubbo.config.annotation.Reference;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("file/")
|
||||
@Validated
|
||||
public class FileController implements FileSwagger {
|
||||
@Reference(version = "1.0.0", retries = 0, timeout = 10000)
|
||||
private FileSystemService fileSystemService;
|
||||
|
||||
@Override
|
||||
@RequestMapping(value = "upload", method = RequestMethod.POST, headers = "content-type=multipart/form-data;charset=utf-8")
|
||||
public ResponseResult upload(
|
||||
@RequestParam(value = "file", required = true)
|
||||
MultipartFile file,
|
||||
@RequestParam(value = "filetag", required = false, defaultValue = "")
|
||||
String filetag,
|
||||
@RequestParam(value = "businesskey", required = true)
|
||||
String businesskey,
|
||||
@RequestParam(value = "metadata", required = false, defaultValue = "")
|
||||
String metadata) {
|
||||
|
||||
try {
|
||||
byte[] fileByte = file.getBytes();
|
||||
return fileSystemService.upload(fileByte, file.getOriginalFilename(), file.getContentType(), filetag, businesskey, metadata);
|
||||
} catch (IOException e) {
|
||||
FileSystemCode fsDeletefileDbfail = FileSystemCode.FS_DELETEFILE_DBFAIL;
|
||||
fsDeletefileDbfail.setMessage(e.getMessage());
|
||||
ExceptionCast.cast(fsDeletefileDbfail);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.cf.file.api.swagger;
|
||||
|
||||
import com.cf.framework.domain.response.ResponseResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.Pattern;
|
||||
|
||||
@Api(tags = {"文件模块"})
|
||||
public interface FileSwagger {
|
||||
@ApiOperation(value = "文件上传")
|
||||
// @ApiImplicitParams({
|
||||
// @ApiImplicitParam(name="file",value = "文件",required=true,paramType="formData",dataType="file"),
|
||||
// @ApiImplicitParam(name="filetag",value = "文件标签",required=false,paramType="query",dataType="string",defaultValue = ""),
|
||||
// @ApiImplicitParam(name="businesskey",value = "文件业务key",required=true,paramType="query",dataType="string"),
|
||||
// @ApiImplicitParam(name="metadata",value = "文件元数据",required=false,paramType="query",dataType="string",defaultValue = ""),
|
||||
// })
|
||||
public ResponseResult upload(MultipartFile file,String filetag,String businesskey,String metadata);
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-file-api
|
||||
server.port=8088
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
#dubbo.scan.base-packages=com.cf.manager.controller
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
## dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
#dubbo.protocol.name=dubbo
|
||||
#dubbo.protocol.port=2181
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
15
cf-file/cf-file-api/src/main/resources/log4j.properties
Normal file
15
cf-file/cf-file-api/src/main/resources/log4j.properties
Normal file
@ -0,0 +1,15 @@
|
||||
### direct log messages to stdout ###
|
||||
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
|
||||
log4j.appender.stdout.Target=System.out
|
||||
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### direct messages to file mylog.log ###
|
||||
log4j.appender.file=org.apache.log4j.FileAppender
|
||||
log4j.appender.file.File=c:/mylog.log
|
||||
log4j.appender.file.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
|
||||
|
||||
### set log levels - for more verbose logging change 'info' to 'debug' ###
|
||||
|
||||
log4j.rootLogger=debug, stdout
|
1
cf-file/cf-file-api/src/main/resources/publickey.txt
Normal file
1
cf-file/cf-file-api/src/main/resources/publickey.txt
Normal file
@ -0,0 +1 @@
|
||||
-----BEGIN PUBLIC KEY-----MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnASXh9oSvLRLxk901HANYM6KcYMzX8vFPnH/To2R+SrUVw1O9rEX6m1+rIaMzrEKPm12qPjVq3HMXDbRdUaJEXsB7NgGrAhepYAdJnYMizdltLdGsbfyjITUCOvzZ/QgM1M4INPMD+Ce859xse06jnOkCUzinZmasxrmgNV3Db1GtpyHIiGVUY0lSO1Frr9m5dpemylaT0BV3UwTQWVW9ljm6yR3dBncOdDENumT5tGbaDVyClV0FEB1XdSKd7VjiDCDbUAUbDTG1fm3K9sx7kO1uMGElbXLgMfboJ963HEJcU01km7BmFntqI5liyKheX+HBUCD4zbYNPw236U+7QIDAQAB-----END PUBLIC KEY-----
|
17
cf-file/cf-file-api/target/classes/application.properties
Normal file
17
cf-file/cf-file-api/target/classes/application.properties
Normal file
@ -0,0 +1,17 @@
|
||||
# Spring boot application
|
||||
spring.application.name=cf-file-api
|
||||
server.port=8088
|
||||
# Base packages to scan Dubbo Component: @org.apache.dubbo.config.annotation.Service
|
||||
#dubbo.scan.base-packages=com.cf.manager.controller
|
||||
|
||||
# Dubbo Application
|
||||
## The default value of dubbo.application.name is ${spring.application.name}
|
||||
## dubbo.application.name=${spring.application.name}
|
||||
|
||||
# Dubbo Protocol
|
||||
#dubbo.protocol.name=dubbo
|
||||
#dubbo.protocol.port=2181
|
||||
|
||||
## Dubbo Registry
|
||||
#dubbo.registry.address=N/A
|
||||
dubbo.registry.address=zookeeper://139.9.155.149:2181
|
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user