Why not just create a bean that starts your monitor on initialization, something like:
@Component
public class Monitor {
@Autowired private SomeService service
@PostConstruct
public void init(){
// start your monitoring in here
}
}
the init
method will not be called until any autowiring is done for the bean.