ssm整合-错误2
1 警告: No mapping found for HTTP request with URI [/management] in DispatcherServlet with name 'dispatcherServlet'
5月 24, 2018 1:05:48 下午 org.springframework.web.servlet.PageNotFound noHandlerFound
警告: No mapping found for HTTP request with URI [/management] in DispatcherServlet with name 'dispatcherServlet'
5月 24, 2018 1:05:55 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deploying web application directory D:\java\tomcat\apache-tomcat-7.0.86\webapps\manager
5月 24, 2018 1:05:55 下午 org.apache.catalina.startup.TldConfig execute
信息: 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.
5月 24, 2018 1:05:55 下午 org.apache.catalina.startup.HostConfig deployDirectory
信息: Deployment of web application directory D:\java\tomcat\apache-tomcat-7.0.86\webapps\manager has finished in 82 ms
5月 24, 2018 1:06:05 下午 org.springframework.web.servlet.PageNotFound handleNoSuchRequestHandlingMethod
警告: No matching handler method found for servlet request: path '/book', method 'GET', parameters map[[empty]]
5月 24, 2018 1:06:11 下午 org.springframework.web.servlet.PageNotFound noHandlerFound
警告: No mapping found for HTTP request with URI [/management/book/list] in DispatcherServlet with name 'dispatcherServlet'
原因是
1、配置文件中路径的问题,读dispatchServlet时将jsp文件一起读入核心控制器,原来是:
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
修改为
<servlet>
<servlet-name>dispatcherServlet</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:spring.xml</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>dispatcherServlet</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
2、RESTful约束下,requestMapping注解使用有效,getMapping注解无效
查找得知为没有设置json的支持包,
Java下常见的Json类库有Gson、JSON-lib和Jackson等,Jackson相对来说比较高效,在项目中主要使用Jackson进行JSON和Java对象转换。
在pom.xml文件中配置依赖:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.3</version>
</dependency>
再次启动Tomcat成功
ssm整合-错误2的更多相关文章
- ssm整合-错误4
严重: Servlet.service() for servlet [dispatcher] in context with path [/management] threw exception [R ...
- ssm整合-错误3
1.警告: Unknown version string [3.1]. Default version will be used. 因为Tomcat版本为7,支持3.1版本的为Tomcat 8: 2. ...
- ssm整合-错误
[Err] 1005 - Can't create table 'imoocdb.ec_article' (errno: 150) 这个错误由外键约束引起的 java.lang.ClassCastEx ...
- SSM整合中遇到的不能扫描注解的bug
我的开发环境为: ubuntu14.04LTS 64bit; Spring Tool Suite 3.5.0.RELEASE Maven 3.2.3 SSM整合中遇到的不能扫描注解的bug 最终解决 ...
- ssm整合说明与模板-Spring Spring MVC Mybatis整合开发
ssm整合说明 spring+spring mvc+mybatis 说明 源码下载 由于之前存在ssh框架,spring+struts+hibernate,其中spring负责aop与ioc,所以一般 ...
- 04.redis集群+SSM整合使用
redis集群+SSM整合使用 首先是创建redis-cluster文件夹: 因为redis最少需要6个节点(三主三从),为了更好的理解,我这里创建了两台虚拟机(192.168.0.109 192.1 ...
- spring MVC框架入门(外加SSM整合)
spring MVC框架 一.什么是sping MVC Spring MVC属于SpringFrameWork的后续产品,已经融合在Spring Web Flow里面.Spring 框架提供了构建 W ...
- ssm 整合(方案二 maven)
通过maven来整合ssm方便很多,至少不用去找jar包 具体架构如下: 1.配置pom.xml <project xmlns="http://maven.apache.org/POM ...
- Maven+SSM整合.doc
Maven + SSM整合 1开发环境搭建 1.1Eclipse4.7(Oxygen) + Tomcat8 + Maven3.5.2 2Maven Web项目创建 2.1新建maven项目 2.2 选 ...
随机推荐
- windows下端口转发 netsh
添加映射表: netsh interface portproxy add v4tov4 listenport=(监听端口) connectaddress=(虚机IP) connectport=(虚机端 ...
- js跳转到邮箱登录
做邮箱验证时为了用户体验,往往会有跳转到邮箱登录这一按钮,其中的js如下: $("#btnemail").click(function () { var userEmail = $ ...
- vue.js ------ 大牛和网站
hellogirl前端网站 : http://www.jqhtml.com/category/article FungLeo: http://blog.csdn.net/FungLeo/article ...
- jQuery中的节点操作(二)
html代码如下 <p title="武汉长乐教育PHP系列教程" name="hello" class="blue"> < ...
- CSS的相对定位和绝对定位(position)
什么是定位呢? 定位(position),故名思议,就是确定元素在页面中的位置. CSS的常用定位有两种,一种是相对定位,一种是绝对定位. 下面我们看例子 <html> <head& ...
- Laravel Scheduling Package
Laravel 是在 App\Console\Kernel 类中的 schedule 方法去定义所有的调度任务. iBrand 产品作为一个电商类产品,本身业务需求非常庞大和复杂,全部定义在 sche ...
- javascript代码工具库
1. 垃圾收集 另一个块作用域非常有用的原因和闭包及回收内存垃圾的回收机制相关.这里简要说明一 下,而内部的实现原理,也就是闭包的机制会在第 5 章详细解释. 考虑以下代码: function pro ...
- 关于Java虚拟机内存原型的基本知识
Java虚拟机内存原型的六个部分: 1.寄存器:我们在程序中无法控制 2.栈:存放基本类型的数据和对象的引用,但对象本身不存放在栈中,而是存放在堆中 3.堆:存放用new产生的数据 4.静态域:存放在 ...
- 【转载】每天一个Linux命令
目 录 每天一个linux命令(1) : ls 命令 每天一个linux命令(2) : cd 命令 每天一个linux命令(3) : pwd 命令 每天一个linux命令(4) : mkdi ...
- April 15 2017 Week 15 Saturday
Attitude is a little thing that makes a big difference. 小态度,大不同. Attitudes can make a big difference ...