简体   繁体   中英

Bean dependency injection in Spring

I have four projects project a , project b , project c, project d.

I want to use some manager class of project c in b , but can't access it directly. and have to do it through project a .

If i move my manager class from project c to project a , then i have some others managers called which i dont have access in project a.

I am using spring to configure these beans. Is there a way in spring to inject dependency such that i have direct access to manager class of project c in b.

How to process this ?

Better to have some sort of main project, that have master-context where all your beans will be defined. That way you can get access to the bean from any point.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM