Mercurial > hg > SpringPlayground
comparison spring-cloud-config-server/src/main/java/de/comline/config/configuration/H2WebConsoleConfig.java @ 19:fe6a57f7a2cf
Spring Cloud Config server
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Thu, 17 Sep 2020 17:24:48 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
18:8504317b9a09 | 19:fe6a57f7a2cf |
---|---|
1 package de.comline.config.configuration; | |
2 | |
3 import org.h2.tools.Server; | |
4 import org.slf4j.Logger; | |
5 import org.slf4j.LoggerFactory; | |
6 import org.springframework.context.annotation.Bean; | |
7 import org.springframework.context.annotation.Configuration; | |
8 | |
9 @Configuration | |
10 public class H2WebConsoleConfig { | |
11 private static final Logger LOG = LoggerFactory.getLogger(H2WebConsoleConfig.class); | |
12 | |
13 @Bean(name = "h2WebConsole", initMethod = "start", destroyMethod = "stop") | |
14 public Server buildServer() throws Exception { | |
15 String port = "8081"; | |
16 | |
17 LOG.info("H2 web console server listening on port " + port); | |
18 return Server.createWebServer("-web", "-webAllowOthers", "-webPort", port); | |
19 } | |
20 } |