Skip to content

Commit

Permalink
Modify tests so they pass in AOT mode
Browse files Browse the repository at this point in the history
... when run via AotIntegrationTests.endToEndTestsForEntireSpringTestModule().
  • Loading branch information
sbrannen committed Oct 16, 2023
1 parent 87127ab commit 3ad79e9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@SpringJUnitConfig
class EarTests {

@Configuration
@Configuration(proxyBeanMethods = false)
static class EarConfig {

@Bean
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -38,7 +38,7 @@
@ContextHierarchy(@ContextConfiguration)
class RootWacEarTests extends EarTests {

@Configuration
@Configuration(proxyBeanMethods = false)
static class RootWacConfig {

@Bean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void test() throws Exception {
}


@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class WebConfig implements WebMvcConfigurer {

Expand All @@ -93,7 +93,7 @@ public void configureViewResolvers(ViewResolverRegistry registry) {
}

@Controller
private static class MyController {
static class MyController {

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

@Component
private static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {
static class HandlerMappingConfigurer implements BeanPostProcessor, PriorityOrdered {

@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void test() throws Exception {
}


@Configuration
@Configuration(proxyBeanMethods = false)
@EnableWebMvc
static class WebConfig implements WebMvcConfigurer {

Expand All @@ -76,7 +76,7 @@ MyController myController() {
}

@Controller
private static class MyController {
static class MyController {

private final AtomicInteger counter = new AtomicInteger();

Expand Down

0 comments on commit 3ad79e9

Please sign in to comment.