New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring plugin registers a managed bean for a prototype bean #241

Artur- opened this Issue May 4, 2018 · 2 comments


None yet
2 participants

Artur- commented May 4, 2018

If you have a Spring Boot app

public class ExampleServletInitializer extends SpringBootServletInitializer {

	public static void main(String[] args) {
		ConfigurableApplicationContext app =, args);
		Test test = app.getAutowireCapableBeanFactory().createBean(Test.class);

and a class in the same package

public class Test {

Then on startup:




However, if you add a method to the Test class, log shows

HOTSWAP AGENT: 10:49:52.401 RELOAD (org.hotswap.agent.plugin.spring.scanner.ClassPathBeanDefinitionScannerAgent) - Registering Spring bean 'test'
HOTSWAP AGENT: 10:49:52.403 INFO (org.hotswap.agent.plugin.spring.getbean.DetachableBeanHolder) - 25 Spring proxies reset

Now when you rerun System.out.println(app.getBeanNamesForType(Test.class).length);, you get


and things no longer work as expected.


This comment has been minimized.


edudant commented May 4, 2018

Caused by #219, I reverted several changes from this issue.


This comment has been minimized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment