Created
April 17, 2017 02:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hardcode.sample; | |
import javax.annotation.PostConstruct; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Component; | |
import lombok.extern.slf4j.Slf4j; | |
@Component | |
@Slf4j | |
public class SampleTest { | |
public static String staticStr; | |
@PostConstruct | |
public void init() { | |
log.info("Static string - {}", staticStr); | |
} | |
@Value("${static.str:'Hello'}") | |
public void setstaticStr(String s) { | |
staticStr = s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment