I need to autowire fields based on the spring.profiles.active
property.
The service is only created based on the profile but the since the service is autowired in other classes I am unable to use the @Profile annotations.
Is there a way to autowire fields based on profile.