aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick/server/configuration
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick/server/configuration')
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java4
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiInitializer.java3
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java2
3 files changed, 3 insertions, 6 deletions
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
index db9dab17..146e277c 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ApiAppConfiguration.java
@@ -68,7 +68,7 @@ import java.util.concurrent.Executors;
@EnableSwagger2
@EnableScheduling
@EnableWebSocket
-@PropertySource("classpath:juick.conf")
+@PropertySource(value = "classpath:juick.conf", ignoreResourceNotFound = true)
@ComponentScan(basePackages = "com.juick.server")
public class ApiAppConfiguration extends BaseWebConfiguration implements WebSocketConfigurer {
@Inject
@@ -132,7 +132,7 @@ public class ApiAppConfiguration extends BaseWebConfiguration implements WebSock
container.setMaxBinaryMessageBufferSize(8192);
return container;
}
- @Value("${hostname}")
+ @Value("${hostname:localhost}")
private String hostname;
@Bean
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiInitializer.java b/juick-server/src/main/java/com/juick/server/configuration/ApiInitializer.java
index b25edd9a..b789fc50 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ApiInitializer.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ApiInitializer.java
@@ -18,8 +18,6 @@
package com.juick.server.configuration;
import com.juick.configuration.DataConfiguration;
-import com.juick.server.configuration.JuickServerWebsocketConfiguration;
-import com.juick.server.configuration.StorageConfiguration;
import org.apache.commons.codec.CharEncoding;
import org.springframework.web.filter.CharacterEncodingFilter;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@@ -35,6 +33,7 @@ public class ApiInitializer extends AbstractAnnotationConfigDispatcherServletIni
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class<?>[]{
+ ApiAppConfiguration.class,
ApiSecurityConfig.class,
DataConfiguration.class,
StorageConfiguration.class
diff --git a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java
index ed79c5f1..58fd4231 100644
--- a/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java
+++ b/juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java
@@ -48,8 +48,6 @@ import java.util.concurrent.TimeUnit;
*/
@Configuration
@EnableWebSecurity
-@PropertySource("classpath:juick.conf")
-@Import(ApiAppConfiguration.class)
public class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
@Value("${auth_remember_me_key}")
private String rememberMeKey;