diff --git a/ds-gw/src/main/java/com/dsideal/gw/Controller/IndexController.java b/ds-gw/src/main/java/com/dsideal/gw/Controller/IndexController.java new file mode 100644 index 00000000..16442d40 --- /dev/null +++ b/ds-gw/src/main/java/com/dsideal/gw/Controller/IndexController.java @@ -0,0 +1,10 @@ +package com.dsideal.gw.Controller; + +import com.jfinal.core.Controller; + +public class IndexController extends Controller { + + public void index() { + renderText("Welcome to ds-gw world! "+getRequest().getRequestURL()); + } +} diff --git a/ds-gw/src/main/java/com/dsideal/gw/GwApplication.java b/ds-gw/src/main/java/com/dsideal/gw/GwApplication.java index 4c8eff9c..37be3fd7 100644 --- a/ds-gw/src/main/java/com/dsideal/gw/GwApplication.java +++ b/ds-gw/src/main/java/com/dsideal/gw/GwApplication.java @@ -2,6 +2,7 @@ package com.dsideal.gw; import cn.hutool.core.io.FileUtil; +import com.dsideal.gw.Controller.IndexController; import com.jfinal.config.*; import com.jfinal.kit.PropKit; import com.jfinal.plugin.redis.RedisPlugin; @@ -39,7 +40,7 @@ public class GwApplication extends JFinalConfig { @Override public void configRoute(Routes me) { //默认页面 - //me.add("/", IndexController.class); + me.add("/dsBase", IndexController.class); } diff --git a/ds-gw/src/main/resources/undertow_dev.properties b/ds-gw/src/main/resources/undertow_dev.properties index 9610eb37..60a9a719 100644 --- a/ds-gw/src/main/resources/undertow_dev.properties +++ b/ds-gw/src/main/resources/undertow_dev.properties @@ -3,10 +3,10 @@ undertow.devMode=true undertow.port=8000 undertow.host=0.0.0.0 #undertow.resourcePath =/root/dsGw/WebRoot,classpath:static -undertow.resourcePath =D:/dsWork/dsExam/ds-gw/WebRoot,classpath:static +undertow.resourcePath =D:/dsWork/dsProject/ds-gw/WebRoot,classpath:static # 目录名称 -undertow.contextPath=/dsGw +undertow.contextPath=/ # 设定I/O线程数. server.undertow.io-threads=8 @@ -27,7 +27,7 @@ undertow.gzip.level=-1 undertow.gzip.minLength=1024 # 开启access日志 -server.undertow.accesslog.enabled=true +server.undertow.accesslog.enabled=false server.undertow.accesslog.pattern=%t %a "%r" %s (%D ms) # ssl 开启时,是否开启 http2。检测该配置是否生效在 chrome 地址栏中输入: chrome://net-internals/#http2 diff --git a/ds-gw/src/main/resources/undertow_pro.properties b/ds-gw/src/main/resources/undertow_pro.properties index dbe0be27..17535295 100644 --- a/ds-gw/src/main/resources/undertow_pro.properties +++ b/ds-gw/src/main/resources/undertow_pro.properties @@ -5,7 +5,7 @@ undertow.host=0.0.0.0 undertow.resourcePath =/root/WebRoot,classpath:static # 目录名称 -undertow.contextPath=/dsBase +undertow.contextPath=/ # 设定I/O线程数. server.undertow.io-threads=8 @@ -26,7 +26,7 @@ undertow.gzip.level=-1 undertow.gzip.minLength=1024 # 开启access日志 -server.undertow.accesslog.enabled=true +server.undertow.accesslog.enabled=false server.undertow.accesslog.pattern=%t %a "%r" %s (%D ms) # ssl 开启时,是否开启 http2。检测该配置是否生效在 chrome 地址栏中输入: chrome://net-internals/#http2 diff --git a/ds-gw/target/classes/undertow_dev.properties b/ds-gw/target/classes/undertow_dev.properties index 9610eb37..60a9a719 100644 --- a/ds-gw/target/classes/undertow_dev.properties +++ b/ds-gw/target/classes/undertow_dev.properties @@ -3,10 +3,10 @@ undertow.devMode=true undertow.port=8000 undertow.host=0.0.0.0 #undertow.resourcePath =/root/dsGw/WebRoot,classpath:static -undertow.resourcePath =D:/dsWork/dsExam/ds-gw/WebRoot,classpath:static +undertow.resourcePath =D:/dsWork/dsProject/ds-gw/WebRoot,classpath:static # 目录名称 -undertow.contextPath=/dsGw +undertow.contextPath=/ # 设定I/O线程数. server.undertow.io-threads=8 @@ -27,7 +27,7 @@ undertow.gzip.level=-1 undertow.gzip.minLength=1024 # 开启access日志 -server.undertow.accesslog.enabled=true +server.undertow.accesslog.enabled=false server.undertow.accesslog.pattern=%t %a "%r" %s (%D ms) # ssl 开启时,是否开启 http2。检测该配置是否生效在 chrome 地址栏中输入: chrome://net-internals/#http2 diff --git a/ds-gw/target/classes/undertow_pro.properties b/ds-gw/target/classes/undertow_pro.properties index dbe0be27..17535295 100644 --- a/ds-gw/target/classes/undertow_pro.properties +++ b/ds-gw/target/classes/undertow_pro.properties @@ -5,7 +5,7 @@ undertow.host=0.0.0.0 undertow.resourcePath =/root/WebRoot,classpath:static # 目录名称 -undertow.contextPath=/dsBase +undertow.contextPath=/ # 设定I/O线程数. server.undertow.io-threads=8 @@ -26,7 +26,7 @@ undertow.gzip.level=-1 undertow.gzip.minLength=1024 # 开启access日志 -server.undertow.accesslog.enabled=true +server.undertow.accesslog.enabled=false server.undertow.accesslog.pattern=%t %a "%r" %s (%D ms) # ssl 开启时,是否开启 http2。检测该配置是否生效在 chrome 地址栏中输入: chrome://net-internals/#http2