提问:
老师,我在做这个项目整合的时候在xml配置文件里面把包名写错了。这样会导致启动tomcat的时候看不出问题,但是访问页面的时候是404.死活找不到原因,这种情况一般怎么排查?eclipse的控制台显示的启动信息里面也不会记录这个错误,一直显示正常启动,8080端口也是开放监听,但实际上里面部署的war有问题。
[INFO] Scanning for projects...
[INFO]
[INFO] --------------------------< com.lx:solrDemo2 >--------------------------
[INFO] Building solrDemo2 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ solrDemo2 ---
[INFO] Deleting D:\source\solrDemo2\target
[INFO]
[INFO] >>> tomcat7-maven-plugin:2.2:run (default-cli) > process-classes @ solrDemo2 >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ solrDemo2 ---
[WARNING] Using platform encoding (GBK actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 0 resource
[INFO] Copying 8 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ solrDemo2 ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding GBK, i.e. build is platform dependent!
[INFO] Compiling 1 source file to D:\source\solrDemo2\target\classes
[INFO]
[INFO] <<< tomcat7-maven-plugin:2.2:run (default-cli) < process-classes @ solrDemo2 <<<
[INFO]
[INFO]
[INFO] --- tomcat7-maven-plugin:2.2:run (default-cli) @ solrDemo2 ---
[INFO] Running war on http://localhost:8080/
[INFO] Creating Tomcat server configuration at D:\source\solrDemo2\target\tomcat
[INFO] create webapp with contextPath:
四月 17, 2020 12:32:51 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-bio-8080"]
四月 17, 2020 12:32:51 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Tomcat
四月 17, 2020 12:32:51 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/7.0.47
四月 17, 2020 12:32:53 下午 org.apache.catalina.core.ApplicationContext log
信息: No Spring WebApplicationInitializer types detected on classpath
四月 17, 2020 12:32:53 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
四月 17, 2020 12:32:54 下午 org.apache.catalina.core.ApplicationContext log
信息: Initializing Spring FrameworkServlet 'springmvc'
四月 17, 2020 12:32:55 下午 org.apache.coyote.AbstractProtocol start
信息: Starting ProtocolHandler ["http-bio-8080"]