Created
June 27, 2022 10:32
-
-
Save mgmgpyaesonewin/41c97795f0024c34e96988cf53ef8bbc to your computer and use it in GitHub Desktop.
Reading Config Map in spring boot
This file contains 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
import java.util.Map; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.stereotype.Component; | |
@Component | |
@ConfigurationProperties(prefix = "integrated-client") | |
public class AgentIdMapConfig { | |
private Map<String, Long> agentIdMap; | |
public Map<String, Long> getAgentIdMap() { | |
return agentIdMap; | |
} | |
public void setAgentIdMap(Map<String, Long> agentIdMap) { | |
this.agentIdMap = agentIdMap; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment