Skip to content

Commit 47de943

Browse files
committed
Upgraded to AspectJ 1.8.1 (also declared as recommended user version) and Tomcat 8.0.9 (first stable version)
Issue: SPR-11957
1 parent 0164f86 commit 47de943

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ configure(allprojects) { project ->
1313
group = "org.springframework"
1414
version = qualifyVersionIfNecessary(version)
1515

16-
ext.aspectjVersion = "1.7.4"
16+
ext.aspectjVersion = "1.8.1"
1717
ext.eclipseLinkVersion = "2.4.2"
1818
ext.groovyVersion = "1.8.9"
1919
ext.hibernate3Version = "3.6.10.Final"
@@ -30,7 +30,7 @@ configure(allprojects) { project ->
3030
ext.slf4jVersion = "1.7.7"
3131
ext.tiles2Version = "2.2.2"
3232
ext.tiles3Version = "3.0.4"
33-
ext.tomcatVersion = "8.0.8"
33+
ext.tomcatVersion = "8.0.9"
3434
ext.xstreamVersion = "1.4.7"
3535

3636
ext.gradleScriptDir = "${rootProject.projectDir}/gradle"
@@ -902,9 +902,9 @@ project("spring-aspects") {
902902

903903
dependencies {
904904
aspects(project(":spring-orm"))
905-
ajc("org.aspectj:aspectjtools:1.8.1") // needed for ajc on JDK 8 only
906-
rt("org.aspectj:aspectjrt:1.8.1") // needed for ajc on JDK 8 only
907-
compile("org.aspectj:aspectjweaver:${aspectjVersion}") // exposing regular AspectJ version to users
905+
ajc("org.aspectj:aspectjtools:${aspectjVersion}")
906+
rt("org.aspectj:aspectjrt:${aspectjVersion}")
907+
compile("org.aspectj:aspectjweaver:${aspectjVersion}")
908908
provided("org.eclipse.persistence:javax.persistence:2.0.0")
909909
optional(project(":spring-aop")) // for @Async support
910910
optional(project(":spring-beans")) // for @Configurable support

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

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2014 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
2323
import org.apache.catalina.connector.Connector;
2424
import org.apache.catalina.startup.Tomcat;
2525
import org.apache.coyote.http11.Http11NioProtocol;
26-
import org.apache.tomcat.util.descriptor.web.ApplicationListener;
2726
import org.apache.tomcat.websocket.server.WsContextListener;
27+
2828
import org.springframework.util.SocketUtils;
2929
import org.springframework.web.context.WebApplicationContext;
3030
import org.springframework.web.servlet.DispatcherServlet;
@@ -36,9 +36,6 @@
3636
*/
3737
public class TomcatWebSocketTestServer implements WebSocketTestServer {
3838

39-
private static final ApplicationListener WS_APPLICATION_LISTENER =
40-
new ApplicationListener(WsContextListener.class.getName(), false);
41-
4239
private final Tomcat tomcatServer;
4340

4441
private final int port;
@@ -47,20 +44,19 @@ public class TomcatWebSocketTestServer implements WebSocketTestServer {
4744

4845

4946
public TomcatWebSocketTestServer() {
50-
5147
this.port = SocketUtils.findAvailableTcpPort();
5248

5349
Connector connector = new Connector(Http11NioProtocol.class.getName());
54-
connector.setPort(this.port);
50+
connector.setPort(this.port);
5551

56-
File baseDir = createTempDir("tomcat");
57-
String baseDirPath = baseDir.getAbsolutePath();
52+
File baseDir = createTempDir("tomcat");
53+
String baseDirPath = baseDir.getAbsolutePath();
5854

5955
this.tomcatServer = new Tomcat();
6056
this.tomcatServer.setBaseDir(baseDirPath);
6157
this.tomcatServer.setPort(this.port);
62-
this.tomcatServer.getService().addConnector(connector);
63-
this.tomcatServer.setConnector(connector);
58+
this.tomcatServer.getService().addConnector(connector);
59+
this.tomcatServer.setConnector(connector);
6460
}
6561

6662
private File createTempDir(String prefix) {
@@ -83,9 +79,9 @@ public int getPort() {
8379

8480
@Override
8581
public void deployConfig(WebApplicationContext wac) {
86-
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
87-
this.context.addApplicationListener(WS_APPLICATION_LISTENER);
88-
Tomcat.addServlet(context, "dispatcherServlet", new DispatcherServlet(wac));
82+
this.context = this.tomcatServer.addContext("", System.getProperty("java.io.tmpdir"));
83+
this.context.addApplicationListener(WsContextListener.class.getName());
84+
Tomcat.addServlet(this.context, "dispatcherServlet", new DispatcherServlet(wac));
8985
this.context.addServletMapping("/", "dispatcherServlet");
9086
}
9187

0 commit comments

Comments
 (0)