Modify tests so they pass in AOT mode

... when run via AotIntegrationTests.endToEndTestsForEntireSpringTestModule().
This commit is contained in:
Sam Brannen
2023-10-16 12:58:07 +02:00
parent 87127ab684
commit 3ad79e919b
4 changed files with 8 additions and 8 deletions

View File

@@ -34,7 +34,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@SpringJUnitConfig
class EarTests {
@Configuration
@Configuration(proxyBeanMethods = false)
static class EarConfig {
@Bean

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2023 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.
@@ -38,7 +38,7 @@ import static org.assertj.core.api.Assertions.assertThat;
@ContextHierarchy(@ContextConfiguration)
class RootWacEarTests extends EarTests {
@Configuration
@Configuration(proxyBeanMethods = false)
static class RootWacConfig {
@Bean

View File

@@ -72,7 +72,7 @@ public class EncodedUriTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class WebConfig implements WebMvcConfigurer {
@@ -93,7 +93,7 @@ public class EncodedUriTests {
}
@Controller
private static class MyController {
static class MyController {
@RequestMapping(value = "/circuit/{id}", method = RequestMethod.GET)
String getCircuit(@PathVariable String id, Model model) {
@@ -103,7 +103,7 @@ public class EncodedUriTests {
}
@Component
private static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {

View File

@@ -65,7 +65,7 @@ public class HttpOptionsTests {
}
@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class WebConfig implements WebMvcConfigurer {
@@ -76,7 +76,7 @@ public class HttpOptionsTests {
}
@Controller
private static class MyController {
static class MyController {
private final AtomicInteger counter = new AtomicInteger();