Created
April 27, 2017 19:25
-
-
Save sidneydemoraes/8c95a6ef7d3420e8f6039a8538192f85 to your computer and use it in GitHub Desktop.
TechTalk - Gradle + Spring Boot + Groovy - ConfigProperties.groovy
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 org.springframework.beans.factory.annotation.Value | |
import org.springframework.context.annotation.Configuration | |
@Configuration | |
class ConfigProperties { | |
@Value('${busca.parametro}') | |
Double raioEmKm; | |
@Value('${email.contato}') | |
String nossoEmail | |
@Value('${paypal.clientId}') | |
String paypalClientId | |
@Value('${paypal.clientSecret}') | |
String paypalClientSecret | |
@Value('${paypal.environment}') | |
String paypalEnvironment | |
double getRaioEmKm() { | |
return raioEmKm > 0 ? raioEmKm : 0.5; | |
} | |
@Deprecated | |
void setRaioEmKm(Double raioEmKm) { | |
this.raioEmKm = raioEmKm | |
} | |
@Deprecated | |
void setNossoEmail(String nossoEmail) { | |
this.nossoEmail = nossoEmail | |
} | |
@Deprecated | |
void setPaypalClientId(String paypalClientId) { | |
this.paypalClientId = paypalClientId | |
} | |
@Deprecated | |
void setPaypalClientSecret(String paypalClientSecret) { | |
this.paypalClientSecret = paypalClientSecret | |
} | |
@Deprecated | |
void setPaypalEnvironment(String paypalEnvironment) { | |
this.paypalEnvironment = paypalEnvironment | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment