@@ -3316,36 +3316,37 @@ private Config defaultConfig(final Config conf, final String cpath) {
33163316 String version = Optional .ofNullable (getClass ().getPackage ().getImplementationVersion ())
33173317 .orElse ("0.0.0" );
33183318 Config defs = ConfigFactory .parseResources (Jooby .class , "jooby.conf" )
3319- .withValue ("contextPath" , ConfigValueFactory .fromAnyRef (cpath .equals ("/" ) ? "" : cpath ))
3320- .withValue ("application.name" , ConfigValueFactory .fromAnyRef (appname ))
3321- .withValue ("application.version" , ConfigValueFactory .fromAnyRef (version ))
3322- .withValue ("application.class" , ConfigValueFactory .fromAnyRef (getClass ().getName ()))
3323- .withValue ("application.ns" , ConfigValueFactory .fromAnyRef (ns ))
3324- .withValue ("application.lang" , ConfigValueFactory .fromAnyRef (lang ))
3325- .withValue ("application.tz" , ConfigValueFactory .fromAnyRef (tz ))
3326- .withValue ("application.numberFormat" , ConfigValueFactory .fromAnyRef (nf ))
3327- .withValue ("server.http2.enabled" , ConfigValueFactory .fromAnyRef (http2 ))
3328- .withValue ("runtime.processors" , ConfigValueFactory .fromAnyRef (processors ))
3329- .withValue ("runtime.processors-plus1" , ConfigValueFactory .fromAnyRef (processors + 1 ))
3330- .withValue ("runtime.processors-plus2" , ConfigValueFactory .fromAnyRef (processors + 2 ))
3331- .withValue ("runtime.processors-x2" , ConfigValueFactory .fromAnyRef (processors * 2 ))
3332- .withValue ("runtime.processors-x4" , ConfigValueFactory .fromAnyRef (processors * 4 ))
3333- .withValue ("runtime.processors-x8" , ConfigValueFactory .fromAnyRef (processors * 8 ))
3334- .withValue ("runtime.concurrencyLevel" , ConfigValueFactory
3335- .fromAnyRef (Math .max (4 , processors )));
3319+ .withValue ("contextPath" , fromAnyRef (cpath .equals ("/" ) ? "" : cpath ))
3320+ .withValue ("application.name" , fromAnyRef (appname ))
3321+ .withValue ("application.version" , fromAnyRef (version ))
3322+ .withValue ("application.class" , fromAnyRef (getClass ().getName ()))
3323+ .withValue ("application.ns" , fromAnyRef (ns ))
3324+ .withValue ("application.lang" , fromAnyRef (lang ))
3325+ .withValue ("application.tz" , fromAnyRef (tz ))
3326+ .withValue ("application.numberFormat" , fromAnyRef (nf ))
3327+ .withValue ("server.http2.enabled" , fromAnyRef (http2 ))
3328+ .withValue ("runtime.processors" , fromAnyRef (processors ))
3329+ .withValue ("runtime.processors-plus1" , fromAnyRef (processors + 1 ))
3330+ .withValue ("runtime.processors-plus2" , fromAnyRef (processors + 2 ))
3331+ .withValue ("runtime.processors-x2" , fromAnyRef (processors * 2 ))
3332+ .withValue ("runtime.processors-x4" , fromAnyRef (processors * 4 ))
3333+ .withValue ("runtime.processors-x8" , fromAnyRef (processors * 8 ))
3334+ .withValue ("runtime.concurrencyLevel" , fromAnyRef (Math .max (4 , processors )))
3335+ .withValue ("server.threads.Min" , fromAnyRef (Math .max (4 , processors )))
3336+ .withValue ("server.threads.Max" , fromAnyRef (Math .max (32 , processors * 8 )));
33363337
33373338 if (charset != null ) {
3338- defs = defs .withValue ("application.charset" , ConfigValueFactory . fromAnyRef (charset .name ()));
3339+ defs = defs .withValue ("application.charset" , fromAnyRef (charset .name ()));
33393340 }
33403341 if (port != null ) {
3341- defs = defs .withValue ("application.port" , ConfigValueFactory . fromAnyRef (port .intValue ()));
3342+ defs = defs .withValue ("application.port" , fromAnyRef (port .intValue ()));
33423343 }
33433344 if (securePort != null ) {
33443345 defs = defs .withValue ("application.securePort" ,
3345- ConfigValueFactory . fromAnyRef (securePort .intValue ()));
3346+ fromAnyRef (securePort .intValue ()));
33463347 }
33473348 if (dateFormat != null ) {
3348- defs = defs .withValue ("application.dateFormat" , ConfigValueFactory . fromAnyRef (dateFormat ));
3349+ defs = defs .withValue ("application.dateFormat" , fromAnyRef (dateFormat ));
33493350 }
33503351 return defs ;
33513352 }
0 commit comments