Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- paaaaaaa
- import java.sql.Connection;
- import java.sql.DriverManager;
- import java.sql.SQLException;
- import java.util.Properties;
- public class DbConnection {
- private String url;
- private Properties properties;
- public DbConnection() {
- this.url = "jdbc:mysql://db4free.net:3306/organizer";
- this.properties = new Properties();
- this.properties.setProperty("user", "andrew");
- this.properties.setProperty("password", "pk_organizer");
- this.properties.setProperty("useSSL", "false");
- this.properties.setProperty("autoReconnect", "true");
- }
- public Connection getConnection() throws SQLException {
- return DriverManager.getConnection(this.url, this.properties);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement