Skip to content

Commit

Permalink
rm explicit exclusion of websocketautoconfiguration
Browse files Browse the repository at this point in the history
the issue with `MockMvc` picking up an uninitialized websocket
upgradefilter has been fixed in
spring-projects/spring-boot@6353603
  • Loading branch information
JKatzwinkel authored Oct 23, 2023
1 parent caa9922 commit 45197ee
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions src/main/java/tla/web/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,20 @@

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.websocket.servlet.WebSocketServletAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.core.SpringProperties;

import lombok.extern.slf4j.Slf4j;

@Slf4j
// exclusion only necessary until spring boot 3.2.0-M4
// (cf. https://github.com/spring-projects/spring-boot/issues/37660) ⬇:
@SpringBootApplication(exclude = WebSocketServletAutoConfiguration.class)
@SpringBootApplication
public class App {

public static void main(String[] args) {
SpringProperties.setFlag("spring.xml.ignore");
ApplicationContext context = SpringApplication.run(
App.class,
args
);
ApplicationContext context = SpringApplication.run(App.class, args);
log.info(
"bean definitions: {}",
context.getBeanDefinitionNames().length
"bean definitions: {}", context.getBeanDefinitionNames().length
);
}

Expand Down

0 comments on commit 45197ee

Please sign in to comment.