Modify logging
This commit is contained in:
parent
2153e6d1a5
commit
28f1fe27e2
|
@ -7,6 +7,8 @@ import org.springframework.context.annotation.Scope;
|
|||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Component
|
||||
@Scope(value = "prototype")
|
||||
public class InitializingBeanExampleBean implements InitializingBean {
|
||||
|
@ -18,6 +20,6 @@ public class InitializingBeanExampleBean implements InitializingBean {
|
|||
|
||||
@Override
|
||||
public void afterPropertiesSet() throws Exception {
|
||||
LOG.info(environment);
|
||||
LOG.info(Arrays.asList(environment.getDefaultProfiles()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,8 @@ import org.springframework.context.annotation.Scope;
|
|||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@Component
|
||||
@Scope(value = "prototype")
|
||||
public class LogicInConstructorExampleBean {
|
||||
|
@ -18,6 +20,6 @@ public class LogicInConstructorExampleBean {
|
|||
public LogicInConstructorExampleBean(Environment environment) {
|
||||
this.environment = environment;
|
||||
|
||||
LOG.info(environment);
|
||||
LOG.info(Arrays.asList(environment.getDefaultProfiles()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import org.springframework.core.env.Environment;
|
|||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.util.Arrays;
|
||||
|
||||
@Component
|
||||
@Scope(value = "prototype")
|
||||
|
@ -19,6 +20,6 @@ public class PostConstructExampleBean {
|
|||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
LOG.info(environment);
|
||||
LOG.info(Arrays.asList(environment.getDefaultProfiles()));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue