Skip to content

Instantly share code, notes, and snippets.

@iocanel
Last active August 29, 2015 14:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iocanel/c0187b2bf15df289fd28 to your computer and use it in GitHub Desktop.
Save iocanel/c0187b2bf15df289fd28 to your computer and use it in GitHub Desktop.
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