From d04620d5b341a41ecc11db2d75df9458857297a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Wed, 26 Feb 2025 15:15:30 +0100 Subject: [PATCH] Polish test Include at least a bean declaration to make sure the cglib proxy is created --- .../org/springframework/boot/SpringApplicationTests.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java index ccd17f15ae3..669f4f1f592 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/SpringApplicationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2024 the original author or authors. + * Copyright 2012-2025 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. @@ -1588,6 +1588,11 @@ class SpringApplicationTests { private InaccessibleConfiguration() { } + @Bean + String testMessage() { + return "test"; + } + } static class SpyApplicationContext extends AnnotationConfigApplicationContext {