NutzCN Logo
问答 Gradle工程里新建moudle 构建hello word Demo访问404
发布于 55天前 作者 qq_32ee9e89 98 次浏览 复制 上一个帖子 下一个帖子
标签: gradle

Gradle工程里访问正常,但工程里新建moudle 构建hello word Demo访问404。

12 回复
HTTP Status [404] – [Not Found]

Type Status Report

Message /hello

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.

后台日志

后台没有日志输出

那你启动的啥? 怎么会没有日志输出?

tomcat启动正常,访问链接404,访问链接的时候没有任何日志输出。

欢迎页可以访问,访问...../hello页面404

public class MainMoudle {

    @At("/hello")
    @Ok("jsp:jsp.hello")
    @Fail("json")
    public String doHello() {
        System.out.println("UUT");
        return "Hello Nutz";
    }
}

贴启动日志

D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\bin\catalina.bat run
[2017-08-02 05:11:48,275] Artifact Gradle : test: manage-0.1.war (exploded): Server is not connected. Deploy is not available.
Using CATALINA_BASE:   "C:\Users\liubo\.IntelliJIdea2017.1\system\tomcat\Unnamed_test_4"
Using CATALINA_HOME:   "D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21"
Using CATALINA_TMPDIR: "D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\temp"
Using JRE_HOME:        "D:\tools\jdk8"
Using CLASSPATH:       "D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\bin\bootstrap.jar;D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\bin\tomcat-juli.jar"
Connected to the target VM, address: '127.0.0.1:59684', transport: 'socket'
02-Aug-2017 17:11:49.887 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/9.0.0.M21
02-Aug-2017 17:11:49.891 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          May 4 2017 22:42:36 UTC
02-Aug-2017 17:11:49.892 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         9.0.0.0
02-Aug-2017 17:11:49.892 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 10
02-Aug-2017 17:11:49.892 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.0
02-Aug-2017 17:11:49.892 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
02-Aug-2017 17:11:49.892 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             D:\tools\jdk8\jre
02-Aug-2017 17:11:49.892 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_131-b11
02-Aug-2017 17:11:49.893 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
02-Aug-2017 17:11:49.893 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Users\liubo\.IntelliJIdea2017.1\system\tomcat\Unnamed_test_4
02-Aug-2017 17:11:49.893 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21
02-Aug-2017 17:11:49.893 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\liubo\.IntelliJIdea2017.1\system\tomcat\Unnamed_test_4\conf\logging.properties
02-Aug-2017 17:11:49.893 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
02-Aug-2017 17:11:49.894 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59684,suspend=y,server=n
02-Aug-2017 17:11:49.894 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -javaagent:C:\Users\liubo\.IntelliJIdea2017.1\system\groovyHotSwap\gragent.jar
02-Aug-2017 17:11:49.898 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
02-Aug-2017 17:11:49.898 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
02-Aug-2017 17:11:49.898 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
02-Aug-2017 17:11:49.898 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
02-Aug-2017 17:11:49.901 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
02-Aug-2017 17:11:49.902 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
02-Aug-2017 17:11:49.903 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
02-Aug-2017 17:11:49.920 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\liubo\.IntelliJIdea2017.1\system\tomcat\Unnamed_test_4
02-Aug-2017 17:11:49.921 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21
02-Aug-2017 17:11:49.921 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\temp
02-Aug-2017 17:11:49.921 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.12] using APR version [1.5.2].
02-Aug-2017 17:11:49.921 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
02-Aug-2017 17:11:49.921 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
02-Aug-2017 17:11:50.969 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.0.2k  26 Jan 2017]
02-Aug-2017 17:11:51.182 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
02-Aug-2017 17:11:51.219 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Aug-2017 17:11:51.225 信息 [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
02-Aug-2017 17:11:51.229 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
02-Aug-2017 17:11:51.230 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2088 ms
02-Aug-2017 17:11:51.287 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
02-Aug-2017 17:11:51.287 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.0.M21
02-Aug-2017 17:11:51.306 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
02-Aug-2017 17:11:51.326 信息 [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
02-Aug-2017 17:11:51.330 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 100 ms
Connected to server
[2017-08-02 05:11:51,581] Artifact Gradle : test: manage-0.1.war (exploded): Artifact is being deployed, please wait...
02-Aug-2017 17:11:52.198 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
[2017-08-02 05:11:52,278] Artifact Gradle : test: manage-0.1.war (exploded): Artifact is deployed successfully
[2017-08-02 05:11:52,278] Artifact Gradle : test: manage-0.1.war (exploded): Deploy took 697 milliseconds
02-Aug-2017 17:11:53.848 信息 [http-nio-8080-exec-3] org.apache.tomcat.util.http.parser.Cookie.logInvalidHeader A cookie header was received [1496109312; Hm_lvt_199b8a0055e193852ba6822737b053b6=1495790638,1496109312; _ga=GA1.1.153016834.1496065850; JSESSIONID=E93369BFFAEBA0BE31FD284E06239EC1] that contained an invalid cookie. That cookie will be ignored.Note: further occurrences of this error will be logged at DEBUG level.
02-Aug-2017 17:12:01.324 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\webapps\manager]
02-Aug-2017 17:12:01.411 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
02-Aug-2017 17:12:01.433 信息 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [D:\tools\apache-tomcat-9.0.0.M21-windows-x64\apache-tomcat-9.0.0.M21\webapps\manager] has finished in [109] ms

配了log4j?? 日志都输出到文件了??

还没有配置log4j日志

那就是根本没加载这个项目了

添加回复
请先登陆
回到顶部