From f1384a874ee415bccba77c8218dbfe63ec67f1bd Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Tue, 13 Dec 2016 02:31:29 +0700 Subject: mysql updater --- .../src/main/java/com/juick/configuration/DataConfiguration.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'juick-server/src/main/java/com/juick/configuration') diff --git a/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java b/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java index 535755c2..d9ef7d38 100644 --- a/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java +++ b/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java @@ -1,5 +1,6 @@ package com.juick.configuration; +import com.juick.database.MySqlUpdater; import com.juick.service.search.SearchService; import org.apache.commons.dbcp2.BasicDataSource; import org.springframework.context.annotation.*; @@ -57,6 +58,14 @@ public class DataConfiguration implements TransactionManagementConfigurer { return new JdbcTemplate(dataSource()); } + @Bean + public MySqlUpdater updater() { + return new MySqlUpdater( + jdbcTemplate(), + transactionManager(), + "update.sql"); + } + @Bean public SearchService emptySearchService() { return new SearchService() { -- cgit v1.2.3