|
|
@@ -7,9 +7,11 @@ import com.telpo.dipperposition.co.RzlAccount; |
|
|
|
import lombok.Getter; |
|
|
|
import lombok.Setter; |
|
|
|
import lombok.ToString; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.beans.factory.annotation.Value; |
|
|
|
import org.springframework.beans.factory.config.ConfigurableBeanFactory; |
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties; |
|
|
|
import org.springframework.context.ConfigurableApplicationContext; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
import org.springframework.context.annotation.Lazy; |
|
|
|
import org.springframework.context.annotation.Scope; |
|
|
@@ -28,14 +30,19 @@ import java.util.Properties; |
|
|
|
@ToString |
|
|
|
@Configuration |
|
|
|
public class PositionConfig { |
|
|
|
@Value(value = "${position.hello}") |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private ConfigurableApplicationContext configurableApplicationContext; |
|
|
|
//@Value(value = "${position.hello}") |
|
|
|
private String hello; |
|
|
|
|
|
|
|
@Value(value = "${spring.application.name}") |
|
|
|
//@Value(value = "${spring.application.name}") |
|
|
|
private String name; |
|
|
|
|
|
|
|
PositionConfig() |
|
|
|
{ |
|
|
|
hello = configurableApplicationContext.getEnvironment().getProperty("position.hello"); |
|
|
|
name = configurableApplicationContext.getEnvironment().getProperty("spring.application.name"); |
|
|
|
} |
|
|
|
|
|
|
|
private static PositionConfig instance; |
|
|
|