aboutsummaryrefslogtreecommitdiff
path: root/juick-rss
diff options
context:
space:
mode:
Diffstat (limited to 'juick-rss')
-rw-r--r--juick-rss/build.gradle1
-rw-r--r--juick-rss/src/main/java/com/juick/rss/Main.java4
2 files changed, 3 insertions, 2 deletions
diff --git a/juick-rss/build.gradle b/juick-rss/build.gradle
index 19a128e3..87f13e50 100644
--- a/juick-rss/build.gradle
+++ b/juick-rss/build.gradle
@@ -10,6 +10,7 @@ dependencies {
compile project(':juick-core')
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
testCompile 'junit:junit:4.12'
+ compile 'org.apache.commons:commons-dbcp2:2.0'
providedRuntime 'mysql:mysql-connector-java:5.1.39'
}
diff --git a/juick-rss/src/main/java/com/juick/rss/Main.java b/juick-rss/src/main/java/com/juick/rss/Main.java
index fd4deca3..46e06677 100644
--- a/juick-rss/src/main/java/com/juick/rss/Main.java
+++ b/juick-rss/src/main/java/com/juick/rss/Main.java
@@ -20,8 +20,8 @@ package com.juick.rss;
import com.juick.Message;
import com.juick.server.MessagesQueries;
import com.juick.server.UserQueries;
+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.WebServlet;
@@ -52,7 +52,7 @@ public class Main extends HttpServlet {
try {
Properties conf = new Properties();
conf.load(getServletContext().getResourceAsStream("/WEB-INF/juick.conf"));
- DriverManagerDataSource dataSource = new DriverManagerDataSource();
+ BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(conf.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
dataSource.setUrl(conf.getProperty("datasource_url"));
sql = new JdbcTemplate(dataSource);