Skip to content

Commit

Permalink
升级spring到3.2.5
Browse files Browse the repository at this point in the history
添加tomcat plugin
  • Loading branch information
zhangkaitao committed Dec 9, 2013
1 parent ca3b652 commit f94f642
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@
<standard.version>1.1.2</standard.version>

<aspectj.version>1.7.2</aspectj.version>
<spring.version>3.2.4.RELEASE</spring.version>
<spring.version>3.2.5.RELEASE</spring.version>
<spring.data.jpa.version>1.4.1.RELEASE</spring.data.jpa.version>

<hibernate.core.version>4.2.6.Final</hibernate.core.version>
Expand Down
22 changes: 22 additions & 0 deletions web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,27 @@
</systemProperties>
</configuration>
</plugin>

<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>${tomcat.maven.version}</version>
<configuration>
<port>9080</port>
<path>/${project.build.finalName}</path>
<!-- spring profile -->
<systemProperties>
<systemProperty>
<name>spring.profiles.active</name>
<value>development</value>
</systemProperty>
</systemProperties>
</configuration>

</plugin>



<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
Expand Down Expand Up @@ -185,6 +206,7 @@
<properties>
<sishuok.common.version>1.0-SNAPSHOT</sishuok.common.version>
<jetty.version>8.1.8.v20121106</jetty.version>
<tomcat.maven.version>2.2</tomcat.maven.version>
<support.basedir>${project.parent.parent.basedir}/src/support</support.basedir>
<site.basedir>${project.parent.parent.basedir}</site.basedir>
<mysql.version>5.1.27</mysql.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ public void offline(final Long userId) {

public DeferredResult newDeferredResult(final Long userId) {
final DeferredResult<Object> deferredResult = new DeferredResult<Object>();

deferredResult.onCompletion(new Runnable() {
@Override
public void run() {
Expand All @@ -70,7 +69,12 @@ public void run() {
}
}
});

deferredResult.onTimeout(new Runnable() {
@Override
public void run() {
deferredResult.setErrorResult("");
}
});
Queue<DeferredResult<Object>> queue = userIdToDeferredResultMap.get(userId);
if(queue == null) {
queue = new LinkedBlockingDeque<DeferredResult<Object>>();
Expand Down
16 changes: 13 additions & 3 deletions web/src/main/resources/spring-mvc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
content-negotiation-manager="contentNegotiationManager"
>
<!--enableMatrixVariables="true">-->

<!-- 异步支持 默认30秒超时 -->
<mvc:async-support default-timeout="30000" task-executor="executor"/>

Expand Down Expand Up @@ -89,8 +88,19 @@
<bean class="org.springframework.web.servlet.handler.ConversionServiceExposingInterceptor">
<constructor-arg ref="conversionService"/>
</bean>
<bean class="com.sishuok.es.common.web.interceptor.SetCommonDataInterceptor"/>
<bean class="org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor"/>
<bean class="com.sishuok.es.common.web.interceptor.SetCommonDataInterceptor">
<property name="excludeUrlPatterns">
<value>
/admin/polling
</value>
</property>
</bean>
<mvc:interceptor>
<mvc:mapping path="/admin/**" />
<mvc:mapping path="/office/**" />
<!--<mvc:exclude-mapping path="/admin/polling"/>-->
<bean class="org.springframework.orm.jpa.support.OpenEntityManagerInViewInterceptor"/>
</mvc:interceptor>
<!--<mvc:interceptor>-->
<!--<mvc:mapping path="/**"/>-->
<!--<bean class="cn.javass.test.interceptor.TestInterceptor"/>-->
Expand Down
1 change: 1 addition & 0 deletions web/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@
<servlet>
<servlet-name>DruidStatView</servlet-name>
<servlet-class>com.alibaba.druid.support.http.StatViewServlet</servlet-class>
<async-supported>true</async-supported>
</servlet>
<servlet-mapping>
<servlet-name>DruidStatView</servlet-name>
Expand Down

0 comments on commit f94f642

Please sign in to comment.