aboutsummaryrefslogtreecommitdiff
path: root/juick-notifications/src/main/java/com/juick/notifications/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'juick-notifications/src/main/java/com/juick/notifications/configuration')
-rw-r--r--juick-notifications/src/main/java/com/juick/notifications/configuration/NotificationsConfiguration.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/juick-notifications/src/main/java/com/juick/notifications/configuration/NotificationsConfiguration.java b/juick-notifications/src/main/java/com/juick/notifications/configuration/NotificationsConfiguration.java
index e1267de0..fd122724 100644
--- a/juick-notifications/src/main/java/com/juick/notifications/configuration/NotificationsConfiguration.java
+++ b/juick-notifications/src/main/java/com/juick/notifications/configuration/NotificationsConfiguration.java
@@ -8,7 +8,6 @@ import com.mitchellbosecke.pebble.loader.Loader;
import com.mitchellbosecke.pebble.loader.ServletLoader;
import com.mitchellbosecke.pebble.spring4.PebbleViewResolver;
import com.mitchellbosecke.pebble.spring4.extension.SpringExtension;
-import org.apache.commons.dbcp2.BasicDataSource;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@@ -17,7 +16,7 @@ import org.springframework.core.env.Environment;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
-import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.web.client.RestTemplate;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@@ -42,11 +41,8 @@ public class NotificationsConfiguration extends WebMvcConfigurationSupport {
ExecutorService service;
@Bean
- JdbcTemplate jdbc() {
- BasicDataSource dataSource = new BasicDataSource();
- dataSource.setDriverClassName(env.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
- dataSource.setUrl(env.getProperty("datasource_url"));
- return new JdbcTemplate(dataSource);
+ RestTemplate rest() {
+ return new RestTemplate();
}
@Inject
private ServletContext servletContext;