aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-02-22 10:54:42 +0300
committerGravatar Vitaly Takmazov2018-02-22 10:54:42 +0300
commit0a47022611e9ade7b4cf04e8d2783e966610e136 (patch)
tree76a366b8d658be9374639aedfb4d7d0add57f389 /juick-www/src/main
parentdbc14ee4919b2f536a4afadba71ba8eb41290eb1 (diff)
server and tests now runnable without config
Diffstat (limited to 'juick-www/src/main')
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java2
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java2
-rw-r--r--juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java1
-rw-r--r--juick-www/src/main/java/com/juick/www/controllers/NewMessage.java4
4 files changed, 4 insertions, 5 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java b/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java
index 613b4c92..bde85ee4 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WebSecurityConfig.java
@@ -43,7 +43,7 @@ import javax.annotation.Resource;
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${auth_remember_me_key}")
private String rememberMeKey;
- @Value("${web_domain:juick.com}")
+ @Value("${web_domain:localhost}")
private String webDomain;
@Resource
private UserService userService;
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java
index 205c0627..c30f5a92 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwAppConfiguration.java
@@ -45,7 +45,7 @@ import java.util.HashMap;
* Created by aalexeev on 11/22/16.
*/
@Configuration
-@PropertySource("classpath:juick.conf")
+@PropertySource(value = "classpath:juick.conf", ignoreResourceNotFound = true)
@EnableCaching
public class WwwAppConfiguration {
@Inject
diff --git a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
index e5119f4f..60a3b9cc 100644
--- a/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
+++ b/juick-www/src/main/java/com/juick/www/configuration/WwwServletConfiguration.java
@@ -46,7 +46,6 @@ import java.util.concurrent.TimeUnit;
*/
@Configuration
@ComponentScan(basePackages = {"com.juick.www"})
-@PropertySource("classpath:juick.conf")
@EnableWebMvc
public class WwwServletConfiguration extends BaseWebConfiguration {
diff --git a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
index 8cf70291..e652b4d5 100644
--- a/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
+++ b/juick-www/src/main/java/com/juick/www/controllers/NewMessage.java
@@ -68,9 +68,9 @@ public class NewMessage {
private PMQueriesService pmQueriesService;
@Inject
private WebApp webApp;
- @Value("${img_path:/var/www/juick.com/i/}")
+ @Value("${img_path:#{systemEnvironment['TEMP']}}")
private String imgDir;
- @Value("${upload_tmp_dir:/var/www/juick.com/i/tmp/}")
+ @Value("${upload_tmp_dir:#{systemEnvironment['TEMP']}}")
private String tmpDir;
private static final Logger logger = LoggerFactory.getLogger(NewMessage.class);