Browse Source

Upgraded to AspectJ 1.8.1 (also declared as recommended user version) and Tomcat 8.0.9 (first stable version)

Issue: SPR-11957
pull/618/head
Juergen Hoeller 12 years ago
parent
commit
47de943926
  1. 10
      build.gradle
  2. 24
      spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java

10
build.gradle

@ -13,7 +13,7 @@ configure(allprojects) { project -> @@ -13,7 +13,7 @@ configure(allprojects) { project ->
group = "org.springframework"
version = qualifyVersionIfNecessary(version)
ext.aspectjVersion = "1.7.4"
ext.aspectjVersion = "1.8.1"
ext.eclipseLinkVersion = "2.4.2"
ext.groovyVersion = "1.8.9"
ext.hibernate3Version = "3.6.10.Final"
@ -30,7 +30,7 @@ configure(allprojects) { project -> @@ -30,7 +30,7 @@ configure(allprojects) { project ->
ext.slf4jVersion = "1.7.7"
ext.tiles2Version = "2.2.2"
ext.tiles3Version = "3.0.4"
ext.tomcatVersion = "8.0.8"
ext.tomcatVersion = "8.0.9"
ext.xstreamVersion = "1.4.7"
ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
@ -902,9 +902,9 @@ project("spring-aspects") { @@ -902,9 +902,9 @@ project("spring-aspects") {
dependencies {
aspects(project(":spring-orm"))
ajc("org.aspectj:aspectjtools:1.8.1") // needed for ajc on JDK 8 only
rt("org.aspectj:aspectjrt:1.8.1") // needed for ajc on JDK 8 only
compile("org.aspectj:aspectjweaver:${aspectjVersion}") // exposing regular AspectJ version to users
ajc("org.aspectj:aspectjtools:${aspectjVersion}")
rt("org.aspectj:aspectjrt:${aspectjVersion}")
compile("org.aspectj:aspectjweaver:${aspectjVersion}")
provided("org.eclipse.persistence:javax.persistence:2.0.0")
optional(project(":spring-aop")) // for @Async support
optional(project(":spring-beans")) // for @Configurable support

24
spring-websocket/src/test/java/org/springframework/web/socket/TomcatWebSocketTestServer.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -23,8 +23,8 @@ import org.apache.catalina.Context; @@ -23,8 +23,8 @@ import org.apache.catalina.Context;
import org.apache.catalina.connector.Connector;
import org.apache.catalina.startup.Tomcat;
import org.apache.coyote.http11.Http11NioProtocol;
import org.apache.tomcat.util.descriptor.web.ApplicationListener;
import org.apache.tomcat.websocket.server.WsContextListener;
import org.springframework.util.SocketUtils;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet;
@ -36,9 +36,6 @@ import org.springframework.web.servlet.DispatcherServlet; @@ -36,9 +36,6 @@ import org.springframework.web.servlet.DispatcherServlet;
*/
public class TomcatWebSocketTestServer implements WebSocketTestServer {
private static final ApplicationListener WS_APPLICATION_LISTENER =
new ApplicationListener(WsContextListener.class.getName(), false);
private final Tomcat tomcatServer;
private final int port;
@ -47,20 +44,19 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer { @@ -47,20 +44,19 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
public TomcatWebSocketTestServer() {
this.port = SocketUtils.findAvailableTcpPort();
Connector connector = new Connector(Http11NioProtocol.class.getName());
connector.setPort(this.port);
connector.setPort(this.port);
File baseDir = createTempDir("tomcat");
String baseDirPath = baseDir.getAbsolutePath();
File baseDir = createTempDir("tomcat");
String baseDirPath = baseDir.getAbsolutePath();
this.tomcatServer = new Tomcat();
this.tomcatServer.setBaseDir(baseDirPath);
this.tomcatServer.setPort(this.port);
this.tomcatServer.getService().addConnector(connector);
this.tomcatServer.setConnector(connector);
this.tomcatServer.getService().addConnector(connector);
this.tomcatServer.setConnector(connector);
}
private File createTempDir(String prefix) {
@ -83,9 +79,9 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer { @@ -83,9 +79,9 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
@Override
public void deployConfig(WebApplicationContext wac) {
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
this.context.addApplicationListener(WS_APPLICATION_LISTENER);
Tomcat.addServlet(context, "dispatcherServlet", new DispatcherServlet(wac));
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
this.context.addApplicationListener(WsContextListener.class.getName());
Tomcat.addServlet(this.context, "dispatcherServlet", new DispatcherServlet(wac));
this.context.addServletMapping("/", "dispatcherServlet");
}

Loading…
Cancel
Save