Archived
The following code
public class interface AddressResolver{...}
@Component
public class GoogleMapAddressResolver implements AddressResolver{
//...
}
@Component
public class CustomMapAddressResolver implements AddressResolver{
//...
}
@Service
public class AddressService{
@Autowired
private AddressResolver addressResolver;
//...
}
Similar QuestionsMore questions about Spring