Skip to content

Commit d94407b

Browse files
authored
add more avaje config options (#141)
1 parent 2f7cefb commit d94407b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

avaje-jex/src/main/java/io/avaje/jex/BootJexState.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ State create(BeanScope beanScope) {
2020
jex.configureWith(beanScope);
2121

2222
JexConfig config = jex.config();
23-
int port = config.port();
24-
config.port(Config.getInt("server.port", port));
25-
23+
config.port(Config.getInt("server.port", config.port()));
24+
config.contextPath(Config.get("server.context.path", config.contextPath()));
25+
config.host(Config.get("server.context.host", config.host()));
2626
jex.lifecycle().onShutdown(beanScope::close);
2727
return new State(jex.start());
2828
}

avaje-jex/src/main/java/io/avaje/jex/JexConfig.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.util.Map;
44
import java.util.concurrent.Executor;
5+
import java.util.concurrent.Executors;
56
import java.util.function.Consumer;
67

78
import com.sun.net.httpserver.HttpsConfigurator;
@@ -48,8 +49,7 @@ public sealed interface JexConfig permits DJexConfig {
4849
JexConfig disableSpiPlugins();
4950

5051
/**
51-
* Executor for serving requests. Defaults to a {@link
52-
* Executors#newVirtualThreadPerTaskExecutor()}
52+
* Executor for serving requests. Defaults to a {@link Executors#newVirtualThreadPerTaskExecutor()}
5353
*/
5454
Executor executor();
5555

@@ -70,7 +70,7 @@ public sealed interface JexConfig permits DJexConfig {
7070
*/
7171
JexConfig health(boolean health);
7272

73-
/** Returns the configured host. (Defaults to localhost if not set) */
73+
/** Returns the configured host. */
7474
String host();
7575

7676
/**

0 commit comments

Comments
 (0)