![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ssm
Alex-xi
hey!
展开
-
@RequestMapping @ResponseBody 和 @RequestBody 注解的用法与区别(转载自:不止会New的博客)
1.@RequestMapping @RequestMapping 是一个用来处理请求地址映射的注解,可用于类或方法上。用于类上,表示类中的所有响应请求的方法都是以该地址作为父路径;用于方法上,表示在类的父路径下追加方法上注解中的地址将会访问到该方法,此处需注意@RequestMapping用在类上可以没用,但是用在方法上必须有。例如:@Controller//设置想要跳转的父路...转载 2018-08-03 22:25:13 · 141 阅读 · 0 评论 -
关于ssm框架上传图片未能解决的问题
参考文章:https://blog.csdn.net/chenchunlin526/article/details/70945877/https://blog.csdn.net/qq_36671474/article/details/77773874https://blog.csdn.net/qq_41669724/article/details/80748952https://blo...原创 2018-09-09 17:07:18 · 824 阅读 · 0 评论 -
spring mvc controller间跳转 重定向 传参
url:http://zghbwjl.blog.163.com/blog/static/12033667220137795252845/1. 需求背景 需求:spring MVC框架controller间跳转,需重定向。有几种情况:不带参数跳转,带参数拼接url形式跳转,带参数不拼接参数跳转,页面也能显示。本来以为挺简单的一件事情,并且个人认为比较常用的一种方式,一百度全都有了,这...转载 2018-09-01 21:38:41 · 278 阅读 · 0 评论 -
利用ssm框架创建mavenweb项目实现发送邮件功能
邮件发送功能是我们在开发中非常常见的一个需求,对于各种账号的注册绑定和账号激活都是非常好用的。因此今天我们来学习一下在spring中实现发送邮件的功能。1.导入jar包。首先我们需要在我们spring项目中添加以下两个jar包(我是使用的maven所以直接配置依赖信息) <!--spring支持--> <dependency> &...转载 2018-09-01 19:25:25 · 849 阅读 · 0 评论 -
Spring中报"Could not resolve placeholder"的解决方案
除去properites文件路径错误、拼写错误外,出现"Could not resolve placeholder"很有可能是使用了多个PropertyPlaceholderConfigurer或者多个<context:property-placeholder>的原因。 比如我有一个dao.xml读取dbConnect.properties,还有一个dfs.xml读取dfs...转载 2018-09-01 19:16:38 · 2224 阅读 · 0 评论 -
在利用ssm框架创建mavenweb项目运行时遇到问题:invalid bound statement (not found)解决办法
需要在pom.xml文件中配置resource,不然mapper.xml文件就会被漏掉!然后就在pom.xml的<build>中配置了resource: <!-- 如果不添加此节点mybatis的mapper.xml文件都会被漏掉。 --> <resources> <resource> ...原创 2018-08-31 22:49:29 · 694 阅读 · 0 评论 -
自定义标签的使用与建立
1、编写自定义标签类,继承tagupport类/** * 自定义标签的使用 * @author Steven * */public class MyTag extends TagSupport { @Override public int doStartTag() throws JspException { ...原创 2018-08-03 10:22:41 · 336 阅读 · 0 评论 -
servlet拦截器的路径问题
url-pattern里面如果为/*,则代表拦截所有的请求包括jsp,/代表拦截所有的请求排除jsp<servlet-mapping> <servlet-name>boot-crm</servlet-name> <!-- 所有的请求都进入springMVC /*代表拦截所有的请求包括jsp,/代表拦...原创 2018-08-02 23:27:53 · 1637 阅读 · 0 评论 -
spring,springmvc与mybatis整合
先从持久层出发一.DAO层(新建一个source folder:config,在其下新建一个文件夹:spring,其下的配置文件如图)(如果是maven下,则直接在src/main/resources下新建一个文件夹:spring): config文件夹下的jdbc.properties: jdbc.driver=com.mysql.jdbc.Driverjdbc.ur...原创 2018-08-02 17:15:18 · 161 阅读 · 0 评论 -
关于网页出现乱码解决办法
1.在spring框架下,如果提交方法为post,则在web.xml中加入: <!-- 解决post乱码问题 --> <filter> <filter-name>encoding</filter-name> <filter-class>org.springframework.web....原创 2018-08-02 15:03:43 · 258 阅读 · 0 评论 -
org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletCon
java.lang.ClassCastException: org.springframework.web.SpringServletContainerInitializer cannot be cast to javax.servlet.ServletContainerInitializer解决办法主要是servlet-api的jar包和服务器的servlet-api有冲突,也有可能和dub...原创 2019-04-07 15:22:06 · 2415 阅读 · 0 评论