配置好component-scan和annotation-driven之后,启动报错

配置好component-scan和annotation-driven之后,启动报错。
为什么会报 java.lang.Exception 错误呢。

<context:component-scan base-package="com.iot.ssm.controller"></context:component-scan>

<mvc:annotation-driven/>

springmvc 启动报下面错:

org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped “{[/ji/ji]}” onto public org.springframework.web.servlet.ModelAndView com.ji.ji.ji() throws java.lang.Exception

、全部:

23-Jun-2021 00:57:25.843 信息 [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars 至少有一个JAR被扫描用于TLD但尚未包含TLD。 为此记录器启用调试日志记录,以获取已扫描但未在其中找到TLD的完整JAR列表。 在扫描期间跳过不需要的JAR可以缩短启动时间和JSP编译时间。
23-Jun-2021 00:57:26.070 信息 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'springmvc': initialization started
23-Jun-2021 00:57:26.096 信息 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace 'springmvc-servlet': startup date [Wed Jun 23 00:57:26 CST 2021]; root of context hierarchy
23-Jun-2021 00:57:26.141 信息 [RMI TCP Connection(2)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from class path resource [springmvc.xml]
23-Jun-2021 00:57:26.584 信息 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.register Mapped "{[/ji/ji]}" onto public org.springframework.web.servlet.ModelAndView com.ji.ji.ji() throws java.lang.Exception
23-Jun-2021 00:57:26.704 信息 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.initControllerAdviceCache Looking for @ControllerAdvice: WebApplicationContext for namespace 'springmvc-servlet': startup date [Wed Jun 23 00:57:26 CST 2021]; root of context hierarchy
23-Jun-2021 00:57:26.906 信息 [RMI TCP Connection(2)-127.0.0.1] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet 'springmvc': initialization completed in 836 ms
23-Jun-2021 00:57:34.530 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory 把web 应用程序部署到目录 [/Users/aajijifujiji/03_softdocument/Eclipse/apache-tomcat-8.5.56/webapps/manager]
23-Jun-2021 00:57:34.562 信息 [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Web应用程序目录[/Users/aajijifujiji/03_softdocument/Eclipse/apache-tomcat-8.5.56/webapps/manager]的部署已在[31]毫秒内完成
阅读 1.2k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题