35 lines
850 B
Java
35 lines
850 B
Java
package com.baeldung.startup;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.beans.factory.InitializingBean;
|
|
import org.springframework.context.annotation.Scope;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import javax.annotation.PostConstruct;
|
|
|
|
@Component
|
|
@Scope(value = "prototype")
|
|
public class AllStrategiesExampleBean implements InitializingBean {
|
|
|
|
private static final Logger LOG = LoggerFactory.getLogger(AllStrategiesExampleBean.class);
|
|
|
|
public AllStrategiesExampleBean() {
|
|
LOG.info("Constructor");
|
|
}
|
|
|
|
@Override
|
|
public void afterPropertiesSet() throws Exception {
|
|
LOG.info("InitializingBean");
|
|
}
|
|
|
|
@PostConstruct
|
|
public void postConstruct() {
|
|
LOG.info("PostConstruct");
|
|
}
|
|
|
|
public void init() {
|
|
LOG.info("init-method");
|
|
}
|
|
}
|