Skip to content

Commit 3ad79e9

Browse files
committed
Modify tests so they pass in AOT mode
... when run via AotIntegrationTests.endToEndTestsForEntireSpringTestModule().
1 parent 87127ab commit 3ad79e9

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

spring-test/src/test/java/org/springframework/test/context/hierarchies/web/EarTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@SpringJUnitConfig
3535
class EarTests {
3636

37-
@Configuration
37+
@Configuration(proxyBeanMethods = false)
3838
static class EarConfig {
3939

4040
@Bean

spring-test/src/test/java/org/springframework/test/context/hierarchies/web/RootWacEarTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2023 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.
@@ -38,7 +38,7 @@
3838
@ContextHierarchy(@ContextConfiguration)
3939
class RootWacEarTests extends EarTests {
4040

41-
@Configuration
41+
@Configuration(proxyBeanMethods = false)
4242
static class RootWacConfig {
4343

4444
@Bean

spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/EncodedUriTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void test() throws Exception {
7272
}
7373

7474

75-
@Configuration
75+
@Configuration(proxyBeanMethods = false)
7676
@EnableWebMvc
7777
static class WebConfig implements WebMvcConfigurer {
7878

@@ -93,7 +93,7 @@ public void configureViewResolvers(ViewResolverRegistry registry) {
9393
}
9494

9595
@Controller
96-
private static class MyController {
96+
static class MyController {
9797

9898
@RequestMapping(value = "/circuit/{id}", method = RequestMethod.GET)
9999
String getCircuit(@PathVariable String id, Model model) {
@@ -103,7 +103,7 @@ String getCircuit(@PathVariable String id, Model model) {
103103
}
104104

105105
@Component
106-
private static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
106+
static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
107107

108108
@Override
109109
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {

spring-test/src/test/java/org/springframework/test/web/servlet/samples/spr/HttpOptionsTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ void test() throws Exception {
6565
}
6666

6767

68-
@Configuration
68+
@Configuration(proxyBeanMethods = false)
6969
@EnableWebMvc
7070
static class WebConfig implements WebMvcConfigurer {
7171

@@ -76,7 +76,7 @@ MyController myController() {
7676
}
7777

7878
@Controller
79-
private static class MyController {
79+
static class MyController {
8080

8181
private final AtomicInteger counter = new AtomicInteger();
8282

0 commit comments

Comments
 (0)