SSM
wnhwx
这个作者很懒,什么都没留下…
展开
-
RestTemplate
直接上代码 package com.api.controller.setup; import com.api.model.TestParam; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller原创 2021-02-23 14:51:06 · 97 阅读 · 1 评论 -
idea项目启动成功但访问404
今天在idea上运行项目时,控制台显示成功启动,但访问时却显示404 按照网上找到的方法修改,没有任何效果,于是和之前的项目进行对比,发现在springmvc.xml中少了一句配置: <mvc:annotation-driven/> ...原创 2021-01-26 08:17:55 · 2759 阅读 · 4 评论 -
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
今天在做项目时遇到一个问题,最后虽然解决了,但还是不明白为什么会出现这样的错误,希望路过的大神能够解惑! 以下是报的错: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java.lang.ClassCastException: java.lang.Lon原创 2020-09-24 09:19:57 · 1190 阅读 · 0 评论 -
ssm项目 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
ssm的项目如果在mapper.xml mapper接口 配置没问题的情况下 项目依然报org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错原因:mapper.xml 和 mapper接口绑定失败 , mapper.xml 找不到 解决方法:在pom文件中指定文件加载 <bu...原创 2019-10-30 17:06:56 · 260 阅读 · 0 评论 -
idea中src/main/resources目录下的applicationContext.xml文件访问src/main/webap目录下的配置文件
如图所示,想要在src/main/resources目录下的applicationContext.xml文件中访问src/main/webap目录下的db.properties,需要两步: applicationContext-dao.xml中进行配置(classpath:后的路径看情况可自行修改): <context:property-placeholder location="...原创 2019-05-21 14:31:02 · 2180 阅读 · 0 评论