Put internalA and internalB in a seperate package and make them package-private. that way, the client cannot @Autowire them.