浏览器里运行的效果正常,为什么在代码中加的打印语句,无法在控制台输出?
F:\app\apache-tomcat-8.5.49\bin\catalina.bat run
[2020-09-27 09:57:52,406] Artifact sm_web:war: Waiting for server connection to start artifact deployment...
Using CATALINA_BASE: "C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\show_jsp_sm"
Using CATALINA_HOME: "F:\app\apache-tomcat-8.5.49"
Using CATALINA_TMPDIR: "F:\app\apache-tomcat-8.5.49\temp"
Using JRE_HOME: "F:\jdk"
Using CLASSPATH: "F:\app\apache-tomcat-8.5.49\bin\bootstrap.jar;F:\app\apache-tomcat-8.5.49\bin\tomcat-juli.jar"
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Server.服务器版本: Apache Tomcat/8.5.49
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器构建: Nov 17 2019 18:45:30 UTC
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 服务器版本号(:8.5.49.0
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 7
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log OS.版本: 6.1
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log 架构: amd64
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Java 环境变量: F:\jdk\jre
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM 版本: 1.8.0_131-b11
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log JVM.供应商: Oracle Corporation
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\show_jsp_sm
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: F:\app\apache-tomcat-8.5.49
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\show_jsp_sm\conf\logging.properties
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.password.file=C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\show_jsp_sm\jmxremote.password
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.access.file=C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\show_jsp_sm\jmxremote.access
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\Administrator\AppData\Local\JetBrains\IntelliJIdea2020.1\tomcat\show_jsp_sm
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=F:\app\apache-tomcat-8.5.49
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=F:\app\apache-tomcat-8.5.49\temp
27-Sep-2020 09:57:53.664 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library [1.2.23] using APR version [1.7.0].
27-Sep-2020 09:57:53.680 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
27-Sep-2020 09:57:53.680 信息 [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL配置:useAprConnector[false],useOpenSSL[true]
27-Sep-2020 09:57:53.680 信息 [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1c 28 May 2019]
27-Sep-2020 09:57:53.773 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["http-nio-8080"]
27-Sep-2020 09:57:53.789 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Sep-2020 09:57:53.789 信息 [main] org.apache.coyote.AbstractProtocol.init 初始化协议处理器 ["ajp-nio-8009"]
27-Sep-2020 09:57:53.805 信息 [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
27-Sep-2020 09:57:53.805 信息 [main] org.apache.catalina.startup.Catalina.load Initialization processed in 361 ms
27-Sep-2020 09:57:53.820 信息 [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
27-Sep-2020 09:57:53.820 信息 [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.5.49
27-Sep-2020 09:57:53.836 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["http-nio-8080"]
27-Sep-2020 09:57:53.836 信息 [main] org.apache.coyote.AbstractProtocol.start 开始协议处理句柄["ajp-nio-8009"]
27-Sep-2020 09:57:53.851 信息 [main] org.apache.catalina.startup.Catalina.start Server startup in 48 ms
Connected to server
[2020-09-27 09:57:53,976] Artifact sm_web:war: Artifact is being deployed, please wait...
27-Sep-2020 09:57:55.489 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
[2020-09-27 09:57:55,536] Artifact sm_web:war: Artifact is deployed successfully
[2020-09-27 09:57:55,536] Artifact sm_web:war: Deploy took 1,560 milliseconds
27-Sep-2020 09:58:03.850 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [F:\app\apache-tomcat-8.5.49\webapps\manager]
27-Sep-2020 09:58:04.007 信息 [localhost-startStop-1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
27-Sep-2020 09:58:04.007 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [F:\app\apache-tomcat-8.5.49\webapps\manager] has finished in [157] ms
27-Sep-2020 09:58:07.896 信息 [http-nio-8080-exec-4] org.springframework.context.support.ClassPathXmlApplicationContext.prepareRefresh Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@4b9637cc: startup date [Sun Sep 27 09:58:07 CST 2020]; root of context hierarchy
27-Sep-2020 09:58:07.973 信息 [http-nio-8080-exec-4] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [spring.xml]
27-Sep-2020 09:58:08.401 警告 [http-nio-8080-exec-4] org.mybatis.spring.mapper.ClassPathMapperScanner.doScan No MyBatis mapper was found in '[com.imooc.sm.dao]' package. Please check your configuration.
27-Sep-2020 09:58:08.506 信息 [http-nio-8080-exec-4] org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName Loaded JDBC driver: com.mysql.jdbc.Driver
正在回答
同学你好,
1、老师这边测试没有问题,可以在控制台输出打印语句。
如下:
2、建议同学重启Tomcat,清空一下日志,如下:
再访问试试。
如果我的回答解决了你的疑惑,请采纳!祝学习愉快!
- 参与学习 人
- 提交作业 323 份
- 解答问题 8263 个
本阶段将带你学习主流框架SSM,以及SpringBoot ,打通成为Java工程师的最后一公里!
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星