aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-01-16 14:13:11 +0300
committerGravatar Vitaly Takmazov2016-01-16 14:13:11 +0300
commit093a022955d547e6f94a4204a193c0e7296c11b2 (patch)
tree55bba7123a9549055e6001702712fffa35f8e801 /src/main/java/com
parentfab3c7d5462cd0b54de3a8cdd377e3476fa90285 (diff)
drop unneeded dependency
Diffstat (limited to 'src/main/java/com')
-rw-r--r--src/main/java/com/juick/api/Main.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/juick/api/Main.java b/src/main/java/com/juick/api/Main.java
index 71f7f2d7..4233c45d 100644
--- a/src/main/java/com/juick/api/Main.java
+++ b/src/main/java/com/juick/api/Main.java
@@ -20,9 +20,15 @@ package com.juick.api;
import com.juick.xmpp.JID;
import com.juick.xmpp.Stream;
import com.juick.xmpp.StreamComponent;
-import org.apache.commons.dbcp2.BasicDataSource;
import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.jdbc.datasource.DriverManagerDataSource;
+import javax.servlet.ServletException;
+import javax.servlet.annotation.MultipartConfig;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.PrintWriter;
@@ -31,12 +37,6 @@ import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.Properties;
-import javax.servlet.ServletException;
-import javax.servlet.annotation.MultipartConfig;
-import javax.servlet.annotation.WebServlet;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
/**
*
@@ -65,7 +65,7 @@ public class Main extends HttpServlet implements Stream.StreamListener {
Class.forName(driverClassName);
sql = DriverManager.getConnection("jdbc:mysql://localhost/juick?autoReconnect=true&user=" + conf.getProperty("mysql_username", "") + "&password=" + conf.getProperty("mysql_password", ""));
sqlSearch = DriverManager.getConnection("jdbc:mysql://127.0.0.1:9306/juick?autoReconnect=true&characterEncoding=utf8&maxAllowedPacket=512000&relaxAutoCommit=true&user=root&password=");
- BasicDataSource dataSource = new BasicDataSource();
+ DriverManagerDataSource dataSource = new DriverManagerDataSource();
dataSource.setUrl(sql.getMetaData().getURL());
dataSource.setDriverClassName(driverClassName);
jdbc = new JdbcTemplate(dataSource);