Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
SRP Solution Part 1
public class S_SingleResponsabilitySolution {
private static class ConnectionDAO {
private Properties connectionProps;
private Connection conn;
private static final String URL = "jdbc:mysql://localhost:3306/employee?useSSL=false";
private ConnectionDAO(String username, String password) {
connectionProps = new Properties();
connectionProps.put("user", username);
connectionProps.put("password", password);
private Connection createConnection() {
//Cria conexão com o banco
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment