增加zheng-cms-common子系统公共模块

This commit is contained in:
shuzheng 2017-02-19 13:14:40 +08:00
parent 1314c4679e
commit 2a34f4462a
8 changed files with 132 additions and 7 deletions

View File

@ -26,13 +26,14 @@
<module>zheng-cms-job</module>
<module>zheng-cms-search</module>
<module>zheng-cms-admin</module>
<module>zheng-cms-common</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.zheng</groupId>
<artifactId>zheng-common</artifactId>
<artifactId>zheng-cms-common</artifactId>
<version>1.0.0</version>
<type>jar</type>
</dependency>

View File

@ -14,14 +14,15 @@
<!-- 订阅服务 -->
<dubbo:consumer check="false"/>
<!-- 文章 -->
<dubbo:reference id="cmsArticleService" interface="com.zheng.cms.rpc.api.CmsArticleService" mock="true"/>
<!-- 类目 -->
<dubbo:reference id="cmsCategoryService" interface="com.zheng.cms.rpc.api.CmsCategoryService" mock="true"/>
<!-- 评论 -->
<dubbo:reference id="cmsCommentService" interface="com.zheng.cms.rpc.api.CmsCommentService" mock="true"/>
<!-- 标签 -->
<dubbo:reference id="cmsTagService" interface="com.zheng.cms.rpc.api.CmsTagService" mock="true"/>
<!-- 用户 -->
<dubbo:reference id="userService" interface="com.zheng.cms.rpc.api.UserService" mock="true"/>
</beans>

View File

@ -1,2 +1,4 @@
env=${profile.env}
zheng-ui.version=${zheng-ui.version}
zheng-ui.version=${zheng-ui.version}
### activeMq
AvtiveMQ.brokerURL=${AvtiveMQ.brokerURL}

View File

@ -0,0 +1,56 @@
<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.zheng</groupId>
<artifactId>zheng-cms</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>zheng-cms-common</artifactId>
<packaging>jar</packaging>
<name>zheng-cms-common</name>
<url>http://www.zhangshuzheng.cn</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.zheng</groupId>
<artifactId>zheng-common</artifactId>
<version>1.0.0</version>
<type>jar</type>
</dependency>
</dependencies>
<build>
<finalName>zheng-cms-common</finalName>
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.xml</include>
</includes>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<skipTests>true</skipTests>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,10 @@
package com.zheng.cms.common.constant;
import com.zheng.common.base.BaseConstants;
/**
* cms系统常量类
* Created by shuzheng on 2017/2/19.
*/
public class CmsConstant extends BaseConstants {
}

View File

@ -0,0 +1,19 @@
package com.zheng.cms.common.constant;
import com.zheng.common.base.BaseResult;
/**
* cms系统常量枚举类
* Created by shuzheng on 2017/2/19.
*/
public class CmsResult extends BaseResult {
public CmsResult(int code, String message, Object data) {
super(code, message, data);
}
public CmsResult(CmsResultConstant cmsResultConstant, Object data) {
super(cmsResultConstant.getCode(), cmsResultConstant.getMessage(), data);
}
}

View File

@ -0,0 +1,36 @@
package com.zheng.cms.common.constant;
/**
* cms系统接口结果常量枚举类
* Created by shuzheng on 2017/2/19.
*/
public enum CmsResultConstant {
SUCCESS(1, "success");
public int code;
public String message;
CmsResultConstant(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}

View File

@ -21,7 +21,7 @@
<dependencies>
<dependency>
<groupId>com.zheng</groupId>
<artifactId>zheng-common</artifactId>
<artifactId>zheng-cms-common</artifactId>
</dependency>
</dependencies>