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 选 ...
随机推荐
- DBCP数据连接池
package com.itheima.utils; import java.io.InputStream; import java.sql.Connection; import java.sql.R ...
- 硬盘和显卡的访问与控制(三)——《x86汇编语言:从实模式到保护模式》读书笔记03
上一篇博文我们用了很大的篇幅说了加载器,这一篇我们该说说用户程序了. 先看作者的源码吧. ;代码清单8-2 ;文件名:c08.asm ;文件说明:用户程序 ;创建日期:2011-5-5 18:17 ; ...
- 使用CSS选择器进行元素定位
在selenium webdriver中,支持使用CSS选择器来进行元素定位,事实在真的投入工作,大量编辑用例和元素定位的时候,使用css 和 xpath才是经常需要用到的. 之前有专门讲过使用xpa ...
- Quartz使用(2) - Quartz核心接口Scheduler、Job
quartz的核心接口如下: 接口 含义 Scheduler scheduler的主要API接口 Job 任务实现接口,期望调度器能够执行 JobDetail 用于定义Job实例 Trigger 调度 ...
- VMWare 9 安装 win8
http://tieba.baidu.com/p/1954912175 http://down.51cto.com/data/497803 win8专业版:NBCCB-JJJDX-PKBKJ-KQX8 ...
- 代码“小白”的温故而知新(一)-----OA管理系统
古人云:温故而知新.这是极好的,近来,作为一个小白,利用点空闲时间把之前几个月自己写过的一个作为练手的一个OA系统又重新拿来温习一番,希望在巩固基础之上能得到新的启示.现在回想起来,之前一个人,写写停 ...
- 阿里云短信验证~JAVA后台
maven :中的 pom.xml添加 <dependency> <groupId>com.aliyun</groupId> <artifactId>a ...
- R语言基础命令与安装
1. R的安装过程 1.1.首先附上清华线路的下载链接Windows版3.3.1 1.2. 选择安装路径 1.3. 注意根据自己的计算机位数选择,如我的是64位,便选择64位安装. 1.4. 其他默认 ...
- Conferences
中国学术会议在线 :http://www.meeting.edu.cn 中国会议网: http://www.chinameeting.com 香山科学会议:http://www.xssc.ac.cn/ ...
- Description Resource Path Location Type Java compiler level does not match the version of the installed Java project facet Unknown Faceted Project Problem (Java Version Mismatch)
project 编译问题,需要三处的jdk版本要保持一致,才能编译通过. 1.在项目上右键properties->project Facets->修改右侧的version 保持一致 2. ...