diff options
author | 2018-04-25 13:54:25 +0300 | |
---|---|---|
committer | 2018-04-25 19:04:07 +0300 | |
commit | 2bf63fc8d2a4b84e051d28e670c7c74b039e2545 (patch) | |
tree | afceff82288a45649156b0a8428999a00464ba59 /juick-www/src/main/java/com/juick/www/configuration/EmbeddedAPIConfig.java | |
parent | 003ff7221782c4f0cf4a5660832e40c7ac386618 (diff) |
www: no more xmpp
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/configuration/EmbeddedAPIConfig.java')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/EmbeddedAPIConfig.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/EmbeddedAPIConfig.java b/juick-www/src/main/java/com/juick/www/configuration/EmbeddedAPIConfig.java new file mode 100644 index 00000000..6ceb140b --- /dev/null +++ b/juick-www/src/main/java/com/juick/www/configuration/EmbeddedAPIConfig.java @@ -0,0 +1,19 @@ +package com.juick.www.configuration; + +import com.juick.server.configuration.PostConfig; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.builder.SpringApplicationBuilder; +import org.springframework.context.ConfigurableApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Configuration +@ConditionalOnClass(name = "com.juick.server.api.Post") +public class EmbeddedAPIConfig { + @Bean + public ConfigurableApplicationContext apiContext() { + return new SpringApplicationBuilder() + .sources(PostConfig.class) + .run("--server.port=8081"); + } +} |