Skip to content

Commit

Permalink
Merge pull request #263 from slovdahl/spring-6-upgrade
Browse files Browse the repository at this point in the history
Update atmosphere-spring to Spring 6 and jakarta.servlet
  • Loading branch information
jfarcand committed Jan 26, 2024
2 parents 426740e + 7897289 commit 8f47cf6
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 21 deletions.
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@
<felix-version>2.4.0</felix-version>
<jms-version>1.1-rev-1</jms-version>
<guice-version>3.0</guice-version>
<spring-version>3.2.16.RELEASE</spring-version>
<spring-version>6.1.3</spring-version>
<wicket.version>1.4.12</wicket.version>
<ahc.version>1.8.3</ahc.version>
<jedis.version>2.0.0</jedis.version>
Expand All @@ -519,6 +519,7 @@
<logback-version>1.1.2</logback-version>

<atmosphere-version>2.7.5</atmosphere-version>
<atmosphere3-version>3.0.4</atmosphere3-version>
<javascript-version>3.1.2</javascript-version>
</properties>
</project>
13 changes: 4 additions & 9 deletions spring/modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,12 @@
<dependency>
<groupId>org.atmosphere</groupId>
<artifactId>atmosphere-runtime</artifactId>
<version>${atmosphere-version}</version>
<version>${atmosphere3-version}</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<version>1.0</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.0.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class SpringWebObjectFactory implements AtmosphereObjectFactory<Class<?>>
public static final String ATMOSPHERE_SPRING_EXCLUDE_CLASSES = "org.atmosphere.spring.excludedClasses";

private static final Logger logger = LoggerFactory.getLogger(SpringWebObjectFactory.class);

protected boolean preventSpringInjection = false;
private final List<Class<?>> excludedFromInjection = new ArrayList<Class<?>>();

Expand All @@ -47,8 +48,7 @@ public <T, U extends T> U newClassInstance(Class<T> classType,
U t = context.getAutowireCapableBeanFactory().createBean(classToInstantiate);

if (t == null) {
logger.info("Unable to find {}. Creating the object directly."
+ classToInstantiate.getName());
logger.info("Unable to find {}. Creating the object directly.", classToInstantiate.getName());
return classToInstantiate.newInstance();
}
return t;
Expand All @@ -60,6 +60,7 @@ public AtmosphereObjectFactory allowInjectionOf(Class<?> aClass) {
return this;
}

@Override
public String toString() {
return "Spring Web ObjectFactory";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import java.util.Enumeration;
import java.util.Map;

import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletContext;

/**
* Spring context.
Expand Down Expand Up @@ -64,6 +64,4 @@ public Map<String, String> getConfig() {
public void setConfig(Map<String, String> config) {
this.config = config;
}

}

Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.WebApplicationContextUtils;

import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import jakarta.servlet.ServletConfig;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServlet;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
Expand Down

0 comments on commit 8f47cf6

Please sign in to comment.