提交 f520276e 编写于 作者: shuzheng5201314's avatar shuzheng5201314

rcp-service统一改为以jar包形式启动

上级 4fd5cd16
......@@ -25,14 +25,12 @@ zheng
| ├── zheng-upms-dao -- MyBatisGenerator代码生成模块,无需开发
| ├── zheng-upms-sso-client -- SSO客户端依赖包
| ├── zheng-upms-rpc-api -- rpc接口包
| ├── zheng-upms-rpc-service -- rpc服务提供者[端口:1112]
| ├── zheng-upms-app1 -- SSO测试客户端1[端口:1113]
| ├── zheng-upms-app2 -- SSO测试客户端2[端口:1114]
| ├── zheng-upms-rpc-service -- rpc服务提供者
| └── zheng-upms-server -- 系统及SSO服务端[端口:1111]
├── zheng-cms -- 内容管理系统
| ├── zheng-cms-dao -- MyBatisGenerator代码生成模块,无需开发
| ├── zheng-cms-rpc-api -- rpc接口包
| ├── zheng-cms-rpc-service -- rpc服务提供者[端口:2225]
| ├── zheng-cms-rpc-service -- rpc服务提供者
| ├── zheng-cms-search -- 搜索服务[端口:2221]
| ├── zheng-cms-admin -- 后台管理[端口:2222]
| ├── zheng-cms-job -- 消息队列、任务调度等[端口:2223]
......
......@@ -9,9 +9,9 @@
</parent>
<artifactId>zheng-cms-rpc-service</artifactId>
<packaging>war</packaging>
<packaging>jar</packaging>
<name>zheng-cms-rpc-service Maven Webapp</name>
<name>zheng-cms-rpc-service</name>
<url>http://www.zhangshuzheng.cn</url>
<dependencies>
......@@ -26,17 +26,6 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<profiles>
......@@ -75,23 +64,6 @@
</resource>
</resources>
<plugins>
<!-- jetty插件 -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<!--<version>9.0.0.v20130308</version>-->
<version>9.2.7.v20150116</version>
<configuration>
<scanIntervalSeconds>3</scanIntervalSeconds>
<webApp>
<contextPath>/</contextPath>
</webApp>
<httpConnector>
<port>2225</port>
</httpConnector>
<reload>automatic</reload>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
......
package com.zheng.cms.rpc.service;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* 服务启动类
* Created by ZhangShuzheng on 2017/2/3.
*/
public class ZhengCmsRpcServiceApplication {
public static void main(String[] args) {
new ClassPathXmlApplicationContext("classpath*:applicationContext*.xml");
System.out.println(">>>>> zheng-cms-rpc-service 启动完成 <<<<<");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- 强制进行转码 -->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<!-- 默认的spring配置文件是在WEB-INF下的applicationContext.xml -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:applicationContext*.xml
</param-value>
</context-param>
<!-- 日志配置文件 -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
</web-app>
\ No newline at end of file
......@@ -9,9 +9,9 @@
</parent>
<artifactId>zheng-upms-rpc-service</artifactId>
<packaging>war</packaging>
<packaging>jar</packaging>
<name>zheng-upms-rpc-service Maven Webapp</name>
<name>zheng-upms-rpc-service</name>
<url>http://www.zhangshuzheng.cn</url>
<dependencies>
......@@ -26,17 +26,6 @@
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
<profiles>
......@@ -75,23 +64,6 @@
</resource>
</resources>
<plugins>
<!-- jetty插件 -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<!--<version>9.0.0.v20130308</version>-->
<version>9.2.7.v20150116</version>
<configuration>
<scanIntervalSeconds>3</scanIntervalSeconds>
<webApp>
<contextPath>/</contextPath>
</webApp>
<httpConnector>
<port>1112</port>
</httpConnector>
<reload>automatic</reload>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
......
package com.zheng.upms.rpc.service;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* 服务启动类
* Created by ZhangShuzheng on 2017/2/3.
*/
public class ZhengUpmsRpcServiceApplication {
public static void main(String[] args) {
new ClassPathXmlApplicationContext("classpath*:applicationContext*.xml");
System.out.println(">>>>> zheng-upms-rpc-service 启动完成 <<<<<");
}
}
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- 强制进行转码 -->
<filter>
<filter-name>CharacterEncodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CharacterEncodingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
<!-- 默认的spring配置文件是在WEB-INF下的applicationContext.xml -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath*:applicationContext*.xml
</param-value>
</context-param>
<!-- 日志配置文件 -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
</web-app>
\ No newline at end of file
package com.zheng.upms.admin.controller;
import com.zheng.common.util.CookieUtil;
import com.zheng.common.util.MD5Util;
import com.zheng.common.util.RedisUtil;
import com.zheng.upms.admin.util.SystemConstant;
import com.zheng.upms.dao.model.UpmsSystemExample;
import com.zheng.upms.dao.model.UpmsUser;
import com.zheng.upms.dao.model.UpmsUserExample;
import com.zheng.upms.rpc.api.UpmsSystemService;
import com.zheng.upms.rpc.api.UpmsUserService;
import org.apache.commons.lang.StringUtils;
......@@ -34,8 +31,6 @@ import java.util.Map;
import java.util.Set;
import java.util.UUID;
import static org.apache.shiro.web.filter.mgt.DefaultFilter.user;
/**
* 单点登录管理
* Created by shuzheng on 2016/12/10.
......@@ -167,6 +162,7 @@ public class SSOController {
Subject subject = SecurityUtils.getSubject();
UsernamePasswordToken usernamePasswordToken = new UsernamePasswordToken(username, password);
try {
usernamePasswordToken.setRememberMe(false);
subject.login(usernamePasswordToken);
} catch (UnknownAccountException e) {
result.put("result", false);
......
......@@ -13,8 +13,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import static com.sun.xml.internal.ws.api.message.Packet.Status.Request;
/**
* 系统controller
* Created by shuzheng on 2016/12/18.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册