![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring框架
忧伤的可乐鸡
这个作者很懒,什么都没留下…
展开
-
spring使用AOP时the prefix aop for element is not bound.和no declaration can be found错误
在使用标签时,xml编译错误报:the prefix aop for element "aop:config" is not bound错误原因是:未在xml文件头部导入xmlns:aop=“http://www.springframework.org/schema/aop”导入后出现继续出现编译错误no declaration can be found原因是:未在xml头文件原创 2016-04-14 10:17:58 · 15052 阅读 · 4 评论 -
spring变量命名小结
1、xxxToUse例如,这里,path是入参,但经过处理后spring并非是将path覆盖掉,而是用pathToUse接住新的参数,这种情景在spring源码中多次出现,吾辈视为spring风格之一2、...原创 2019-01-06 23:03:36 · 369 阅读 · 3 评论 -
spring有使用catch做逻辑判断
这里,是spring DefaultResourceLoader 中的代码片段,逻辑是location是否可以转换成java.net.URL,这里的配置文件我配置的并非url,所以转换的时候会抛异常进入catch,异常是no protocol,没有这个协议,在catch里面spring直接走了非url的逻辑。平时写代码的时候我极力避免这种case,但其实发现简单的在catch中处理一些简单...原创 2019-01-06 22:42:22 · 812 阅读 · 0 评论 -
spring源码阅读笔记(一)之HelloWorld和spring第一步ClassPathXMLApplicationContext
文章目录spring源码阅读新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入spring源码阅读第一次读sp...原创 2018-12-25 11:35:25 · 288 阅读 · 0 评论 -
spring boot笔记
1、You should only ever add one @SpringBootApplication or @EnableAutoConfiguration annotation. We generally recommend that you add one or the other to your primary @Configuration class only.Many Spring...原创 2018-04-10 20:57:18 · 190 阅读 · 0 评论 -
spring和springmvc相关问题合集
1、用springmvc配置完视图解释器后,直接访问项目的时候,显示404,但是其接口和页面都可以显示,应该是视图解释器没有截获到 / 。配置如下<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/"...原创 2018-02-25 17:12:20 · 144 阅读 · 0 评论 -
SpringMVC中使用Interceptor拦截器
转载于http://haohaoxuexi.iteye.com/blog/1750680。收藏到这里,谢谢大神分享经验。 SpringMVC 中的Interceptor 拦截器也是相当重要和相当有用的,它的主要作用是拦截用户的请求并进行相应的处理。比如通过它来进行权限验证,或者是来判断用户是否登陆,或者是像12306 那样子判断当前时间是否是购票时间。 一、定义Interceptor实转载 2016-06-06 20:12:47 · 308 阅读 · 0 评论 -
我遇见的spring异常及其解决方案(持续更新)
最近在咕咚spring,这里做下笔记吧。1、找不到指定类(报错:ClassNotFoundException)愿意:少jar包解决方案:导入相应jar包2、注入失败(org.springframework.beans.factory.BeanCreationException)原因1:配置文件加载出错,导致注入失败,数据源配置有问题。3、找不到指定URI(No mappin原创 2016-05-13 12:12:48 · 426 阅读 · 0 评论 -
Spring jdbcTemplate之决不回滚解决方案
最近在学习spring,用到这个jdbcTemplate时发现他怎么都不回滚,就算用spring最开始的侵入式回滚都不好使,我蒙蔽了,一会弄明白了一定要写出来和大家分享,这个人性的jdbcTemplate原创 2016-05-12 16:53:51 · 3499 阅读 · 0 评论 -
The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectl
The type org.springframework.http.converter.HttpMessageConverter cannot be resolved. It is indirectly referenced from required .class files原创 2016-04-16 16:37:38 · 3182 阅读 · 0 评论 -
spring骚操作记录
在spring中看到了一个挺骚的操作,对value值设置为可merg和不可merge,可merge的值会实现Mergeable接口,然后在属性名冲突的时候,根据是否实现这个接口判断一波,如果可merge就把两个属性merge到一起,不可merge才覆盖...原创 2019-01-12 21:34:01 · 455 阅读 · 1 评论