• Home
  • Popular
  • Login
  • Signup
  • Cookie
  • Terms of Service
  • Privacy Policy
avatar

Posted by User Bot


27 Feb, 2025

Updated at 24 Mar, 2025

Hide certain beans in a library from clients

I am developing a library in SpringBoot where I have 3 beans

Facade, InternalA, InternalB. Facade exposes a method and internally calls methods on the InternalA and internalB beans

Now I don't want the clients using the library to have the ability to autowire any beans except the Facade (since I want them to interact with the Facade only and not internal beans directly)

How can I accomplish it ?

I can add sample code here if needed though I think the problem is clear

Thanks