aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPServer.java8
-rw-r--r--juick-server/src/main/java/com/juick/server/configuration/ApiSecurityConfig.java2
-rw-r--r--juick-server/src/test/java/com/juick/server/tests/ServerTests.java3
3 files changed, 7 insertions, 6 deletions
diff --git a/juick-server/src/main/java/com/juick/server/XMPPServer.java b/juick-server/src/main/java/com/juick/server/XMPPServer.java
index 358860f7..9f0a8183 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPServer.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPServer.java
@@ -67,13 +67,13 @@ public class XMPPServer implements ConnectionListener, AutoCloseable {
private Jid jid;
@Value("${s2s_port:5269}")
private int s2sPort;
- @Value("${keystore}")
+ @Value("${keystore:juick.p12}")
public String keystore;
- @Value("${keystore_password}")
+ @Value("${keystore_password:secret}")
public String keystorePassword;
- @Value("${broken_ssl_hosts}")
+ @Value("${broken_ssl_hosts:}")
public String[] brokenSSLhosts;
- @Value("${banned_hosts}")
+ @Value("${banned_hosts:}")
public String[] bannedHosts;
private final List<ConnectionIn> inConnections = new CopyOnWriteArrayList<>();
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 58fd4231..f074f9c7 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
@@ -49,7 +49,7 @@ import java.util.concurrent.TimeUnit;
@Configuration
@EnableWebSecurity
public class ApiSecurityConfig extends WebSecurityConfigurerAdapter {
- @Value("${auth_remember_me_key}")
+ @Value("${auth_remember_me_key:secret}")
private String rememberMeKey;
@Inject
private UserService userService;
diff --git a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
index b1848986..c9c47a39 100644
--- a/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/juick-server/src/test/java/com/juick/server/tests/ServerTests.java
@@ -24,6 +24,7 @@ import com.juick.ExternalToken;
import com.juick.Message;
import com.juick.Tag;
import com.juick.User;
+import com.juick.configuration.DataConfiguration;
import com.juick.configuration.RepositoryConfiguration;
import com.juick.server.EmailManager;
import com.juick.server.XMPPBot;
@@ -76,7 +77,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
* Created by vitalyster on 25.11.2016.
*/
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(classes = {ApiAppConfiguration.class, ApiSecurityConfig.class, RepositoryConfiguration.class})
+@ContextConfiguration(classes = {ApiAppConfiguration.class, ApiSecurityConfig.class, DataConfiguration.class, RepositoryConfiguration.class})
@TestPropertySource(properties = {"broken_ssl_hosts=localhost,serverstorageisfull.tld"})
@WebAppConfiguration
public class ServerTests extends AbstractJUnit4SpringContextTests {