Posts

Showing posts from 2016

spring 4.2.x with cross domain profile

1.what i need write cross domain profile in my java server with spring. 2.how after spring web 4.2.2,can simple write below code in spring-mvc.xml: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"   xmlns:mvc="http://www.springframework.org/schema/mvc"   xsi:schemaLocation="http://www.springframework.org/schema/beans     http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd>       <!-- other code -->      <mvc:cors> <mvc:mapping path="/**" allowed-origins="*" allowed-methods="*" allowed-headers="*" exposed-headers="X-Requested-With, X-PKRSS-Toke...

tomcat manager with eclipse maven deploy profile

1. what my java web server is tomcat 9 m9,with tomcat manager,i can deploy web app war with eclipse maven menu,or by tomcat manager web,or by script. 2. how 2.1 install tomcat 9 # yum install -y java wget # mkdir ~/download # cd ~/download # wget -c http://mirrors.cnnic.cn/apache/tomcat/tomcat-9/v9.0.0.M9/bin/apache-tomcat-9.0.0.M9.tar.gz # tar -zxvf apache-tomcat-9.0.0.M9.tar.gz # mv apache-tomcat-9.0.0.M9 /usr/local/tomcat9 # vi /etc/profile export TOMCAT_HOME=/usr/local/tomcat9 export CATALINA_HOME=/usr/local/tomcat9 # source /etc/profile (6) # vi /usr/local/tomcat9/conf/tomcat-users.xml <role rolename="tomcat"/> <role rolename="manager-script"/> <user username="manager" password="123456" roles="manager-gui"/> <user username="script" password="123456" roles="manager-script"/> # mkdir -p /usr/local/tomcat9/conf/Catalina/localhost/ # vi /usr/local/to...

jekins+tomcat7+maven+auto deploy+junit+svn developer log

1. what  i need used maven to auto deploy my spring war to tomcat with version war. it can auto run junit,if ok, then publish it to tomcat,else email me error history. 2. how 2.1 install tomcat 7+ edit tomcat\conf\tomcat-users.xml <role rolename="manager-gui"/> <role rolename="manager-script"/> <role rolename="admin-gui"/> <user password="tomcat" roles="manager-gui,admin-gui" username="tomcat"/> <user password="123456" roles="manager-script" username="admin"/> 2.2. edit spring web project's pom.xml <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/maven-v4_0_0.xsd">   <modelVersion>4.0.0</modelVersion>   <groupId>com.pkrss</groupId>   <artifactId...