How do I override a Spring bean definition yet still reference the overridden bean?

后端 未结 5 875
忘了有多久
忘了有多久 2020-12-29 13:03

I\'m attempting to implement a delegate Service provider by overriding the bean definition for the original service with my delegate Service. However, as the name would imp

5条回答
  •  抹茶落季
    2020-12-29 13:45

    You can create proxies and interceptors. So now the bean named service will become a proxy to the original service which needs to be renamed to something else. So the changes will be limited to the Spring XML only and not be propagated to your java code.

    
        Tony
        51
    
    
    
        Custom string property value
    
    
    
    
    
    
        com.mycompany.Person
    
        
        
            
                myAdvisor
                debugInterceptor
            
        
    
    

提交回复
热议问题