Create a gist now

Instantly share code, notes, and snippets.

Mysql Configuration Object
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