Last active
August 29, 2015 14:23
-
-
Save iocanel/c0187b2bf15df289fd28 to your computer and use it in GitHub Desktop.
Mysql Configuration Object
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.apache.deltaspike.core.api.config.ConfigProperty; | |
import javax.inject.Inject; | |
public class MysqlConfiguration { | |
@Inject | |
@ConfigProperty(name = "USERNAME", defaultValue = "admin") | |
private String username; | |
@Inject | |
@ConfigProperty(name = "PASSWORD", defaultValue = "admin") | |
private String password; | |
@Inject | |
@ConfigProperty(name = "DATABASE_NAME", defaultValue = "mydb") | |
private String databaseName; | |
public String getUsername() { | |
return username; | |
} | |
public String getPassword() { | |
return password; | |
} | |
public String getDatabaseName() { | |
return databaseName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment