aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/configuration
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-12-20 14:28:00 +0300
committerGravatar Vitaly Takmazov2016-12-20 14:28:00 +0300
commit3859c9616d0a7a04e68427d173b863161b818140 (patch)
treecba4d1aea88b7ce0d94cbc30fc05f765c9faaa15 /juick-server/src/main/java/com/juick/configuration
parent8b02f969d3a09e39557474eb90ec821d550e3b1b (diff)
StringUtils.EMPTY
Diffstat (limited to 'juick-server/src/main/java/com/juick/configuration')
-rw-r--r--juick-server/src/main/java/com/juick/configuration/DataConfiguration.java5
-rw-r--r--juick-server/src/main/java/com/juick/configuration/SearchConfiguration.java5
2 files changed, 6 insertions, 4 deletions
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 efee4731..4258703d 100644
--- a/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java
+++ b/juick-server/src/main/java/com/juick/configuration/DataConfiguration.java
@@ -3,6 +3,7 @@ package com.juick.configuration;
import com.juick.database.MySqlUpdater;
import com.juick.service.search.SearchService;
import org.apache.commons.dbcp2.BasicDataSource;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.*;
import org.springframework.core.env.Environment;
import org.springframework.jdbc.core.JdbcTemplate;
@@ -34,8 +35,8 @@ public class DataConfiguration implements TransactionManagementConfigurer {
dataSource.setDriverClassName(env.getProperty("datasource_driver", "com.mysql.jdbc.Driver"));
dataSource.setUrl(env.getProperty("datasource_url"));
- dataSource.setUsername(env.getProperty("datasource_user", ""));
- dataSource.setPassword(env.getProperty("datasource_password", ""));
+ dataSource.setUsername(env.getProperty("datasource_user", StringUtils.EMPTY));
+ dataSource.setPassword(env.getProperty("datasource_password", StringUtils.EMPTY));
dataSource.setValidationQuery("select 1");
diff --git a/juick-server/src/main/java/com/juick/configuration/SearchConfiguration.java b/juick-server/src/main/java/com/juick/configuration/SearchConfiguration.java
index 5f04ea4e..e6b446b6 100644
--- a/juick-server/src/main/java/com/juick/configuration/SearchConfiguration.java
+++ b/juick-server/src/main/java/com/juick/configuration/SearchConfiguration.java
@@ -3,6 +3,7 @@ package com.juick.configuration;
import com.juick.service.search.SearchService;
import com.juick.service.search.SphinxSearchServiceImpl;
import org.apache.commons.dbcp2.BasicDataSource;
+import org.apache.commons.lang3.StringUtils;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.DependsOn;
@@ -28,8 +29,8 @@ public class SearchConfiguration {
dataSource.setDriverClassName(env.getProperty("sphinx_driver", "com.mysql.jdbc.Driver"));
dataSource.setUrl(env.getProperty("sphinx_url"));
- dataSource.setUsername(env.getProperty("sphinx_user", ""));
- dataSource.setPassword(env.getProperty("sphinx_password", ""));
+ dataSource.setUsername(env.getProperty("sphinx_user", StringUtils.EMPTY));
+ dataSource.setPassword(env.getProperty("sphinx_password", StringUtils.EMPTY));
return dataSource;
}