Created
March 25, 2021 21:07
AwsConfigurationProperties Example
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
package example.springboot.config; | |
import static example.springboot.config.AwsConfigurationProperties.PREFIX; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.stereotype.Component; | |
/** | |
* Sample ConfigurationProperties for AWS STS | |
* | |
* @author iyerk | |
* | |
*/ | |
@ConfigurationProperties(PREFIX) | |
@Component | |
public class AwsConfigurationProperties { | |
/** | |
* Prefix for configuration properties. | |
*/ | |
public static final String PREFIX = "cloud.aws.credentials"; | |
private String accessKey; | |
private String secretKey; | |
private String sessionToken; | |
public String getAccesskey() { | |
return accessKey; | |
} | |
public void setAccesskey(String accessKey) { | |
this.accessKey = accessKey; | |
} | |
public String getSecretKey() { | |
return secretKey; | |
} | |
public void setSecretKey(String secretKey) { | |
this.secretKey = secretKey; | |
} | |
public String getSessionToken() { | |
return sessionToken; | |
} | |
public void setSessionToken(String sessionToken) { | |
this.sessionToken = sessionToken; | |
} | |
@Override | |
public String toString() { | |
return "AwsConfigurationProperties [accessKey=" + accessKey + ", secretKey=" + secretKey + ", sessionToken=" | |
+ sessionToken + "]"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment