Say I\'m defining a caching bean which will be initialized upon launch of the application and will be refreshed at a fixed interval as seen below:
@Component
pub
Yes, the method annotated with @PostConstruct
is guaranteed to execute first.
The @Scheduled
annotation is activated by ScheduledAnnotationBeanPostProcessor.postProcessAfterInitialization() which is invoked after any bean initialization callbacks (like InitializingBean's afterPropertiesSet or a custom init-method).