Instantly share code, notes, and snippets.

What would you like to do?
Mysql Configuration Object
import org.apache.deltaspike.core.api.config.ConfigProperty;
import javax.inject.Inject;
public class MysqlConfiguration {
@ConfigProperty(name = "USERNAME", defaultValue = "admin")
private String username;
@ConfigProperty(name = "PASSWORD", defaultValue = "admin")
private String password;
@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