facelog-client
Used in:
components
- OverviewOverview
- VersionsVersions
- DependentsDependents
- DependenciesDependencies
<dependency> <groupId>com.gitee.l0km</groupId> <artifactId>facelog-client</artifactId> <version>5.3.0</version> </dependency>
<?xml version="1.0"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.gitee.l0km</groupId> <artifactId>facelog</artifactId> <version>5.3.0</version> <relativePath>..</relativePath> </parent> <artifactId>facelog-client</artifactId> <name>facelog client base Apache/thrift</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <!-- 生成IFaceLog接口的基于facebook/swift的client实现代码 --> <codegen.dir>${project.basedir}/src/codegen/java</codegen.dir> <stub.dir>${project.basedir}/src/thrift/java</stub.dir> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </dependency> <dependency> <groupId>com.gitee.l0km</groupId> <artifactId>xthrift-thrift</artifactId> <version>${xthrift.version}</version> <exclusions> <exclusion> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> </exclusion> </exclusions> </dependency> <!-- xthrift-thrift中为了解决 org.apache.thrift.protocol.TJSONProtocol.readJSONBase64()方法解码出错问题, 将依赖的libthrift的版本从0.9.1升级为0.12.0 但0.9.1版本中的org.apache.thrift.TApplicationException.read(Protocol)方法在在0.12.0版本改名为readFrom,不兼容 所以 client 端不能用0.12.0版本,还得换回0.9.1 --> <dependency> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> <version>0.9.1</version> </dependency> <dependency> <groupId>${project.groupId}</groupId> <artifactId>facelog-client-base</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>com.gitee.l0km</groupId> <artifactId>dtalk-common-activemq</artifactId> <version>${dtalk.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>com.gitee.l0km</groupId> <artifactId>dtalk-common-redis</artifactId> <version>${dtalk.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <pluginManagement> <plugins> <!-- 根据IDL文件(IFaceLog.thrift)生成thrift stub代码 --> <plugin> <groupId>com.facebook.mojo</groupId> <artifactId>swift-maven-plugin</artifactId> <version>${swift.version}</version> <executions> <execution> <phase>compile</phase> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration> <!-- 指定IDL文件 --> <idlFiles> <directory>${project.basedir}/../facelog-service</directory> <includes> <include>IFaceLog.thrift</include> </includes> </idlFiles> <!-- 指定生成标准java bean --> <codeFlavor>java-regular</codeFlavor> <outputFolder>${stub.dir}</outputFolder> <!-- 指定生成代码的package --> <overridePackage>net.gdface.facelog.client.thrift</overridePackage> <!-- 指定生成的client 代码是否抛出 TException 异常 --> <addThriftExceptions>false</addThriftExceptions> <!-- 指定生成的服务端异常是否为继承自RuntimeException --> <extendRuntimeException>false</extendRuntimeException> </configuration> </plugin> </plugins> </pluginManagement> <plugins> <!-- 配置client,thrift文件夹,用于保存codegen和swift-generator生成的代码 --> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <id>add-source</id> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${codegen.dir}</source> <source>${stub.dir}</source> </sources> </configuration> </execution> </executions> </plugin> <!-- 生成IFaceLog接口的基于facebook/swift的client实现代码 --> <plugin> <groupId>com.gitee.l0km</groupId> <artifactId>codegen-thrift-maven-plugin</artifactId> <version>${codegen.version}</version> <executions> <execution> <goals> <goal>generate</goal> </goals> </execution> </executions> <configuration> <interfaceClass>net.gdface.facelog.IFaceLog</interfaceClass> <refClass>net.gdface.facelog.FacelogDefaultImpl</refClass> <package>net.gdface.facelog.thrift</package> <outputDir>${codegen.dir}</outputDir> <thriftPackage>net.gdface.facelog.client.thrift</thriftPackage> <taskType>CLIENT</taskType> </configuration> </plugin> </plugins> </build> </project>