In the SpringBoot3 application built by Graalvm Native Image, build time and run time both create a bean(forceAutoProxyCreatorToUseClassProxying).
run-time error
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'forceAutoProxyCreatorToUseClassProxying' defined in org.springframework.boot.autoconfigure.aop.AopAutoConfiguration$ClassProxyingConfiguration: @Bean definition illegally overridden by existing bean definition: Root bean: class [org.springframework.beans.factory.config.BeanFactoryPostProcessor]; scope=; abstract=false; lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=forceAutoProxyCreatorToUseClassProxying; initMethodNames=null; destroyMethodNames=null`
I found build-time it has be created:
`DEBUG o.s.b.f.s.DefaultListableBeanFactory - Creating shared instance of singleton bean 'forceAutoProxyCreatorToUseClassProxying'
How can I configure it to avoid this error?
Comment From: mhalbritter
If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.
Comment From: chuailiwu
The minimal sample can not be created easily.