Spring随笔3
来源:互联网 发布:mac打开csgo黑屏 编辑:程序博客网 时间:2024/06/05 17:23
1、applicationContext.xml中引用Spring多个Schema空间的格式定义文件的错误
原代码文件(部分)
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.2.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.1.xsd
修改后的代码文件
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.1.xsd声明空间不能被找到,故而造成了错误。
附一个完整的Spring配置文件:(感谢老司机high_great.cheng的帮助)
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"xmlns:task="http://www.springframework.org/schema/task" xmlns:p="http://www.springframework.org/schema/p"xmlns:jee="http://www.springframework.org/schema/jee" xmlns:util="http://www.springframework.org/schema/util"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-4.0.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd">
2、jar包缺失
在引入jar包时缺少了aopalliance-1.0.jar和aspectjweaver-1.8.7.jar等两个jar包
3、SQL语句错误
在编写代码时,由于SQL语句过长,于是用字符串的拼接方式来完成SQL语句的书写,但是在“+”前后却忘记了空格,出现了类似下面的错误:
正确写法:
SELECT * FROM tablename where seclect_name ="name";
错误写法:
"SELECT * FROM tablename"+"where seclect_name =‘name’;"拼接完成后SELECT * FROM tablenamewhere seclect_name ="name";
4、未知bug
删除错误句,重新写一下就好了
0 0
- Spring随笔3
- spring学习随笔3
- spring随笔
- Spring随笔
- spring随笔
- Spring随笔
- spring随笔
- spring随笔
- Spring随笔
- spring 事务管理 随笔
- spring mvc随笔
- Spring mvc随笔
- spring基础知识随笔
- Spring随笔1
- Spring随笔2
- Spring随笔4
- Spring随笔5
- Spring随笔6
- 10 个让程序员放松的网站
- C++的继承与派生:公有,私有,保护
- 浏览器与HTTP网络协议缓存原理分析 转自网界网:http://news.cnw.com.cn/news-china/htm2015/20151027_322909.shtml
- 场景二:synchronized修饰方法
- monkeyrunner自动化测试工具--录制回放
- Spring随笔3
- android软键盘的属性设置
- Android小记:EditText的两个常用属性
- iOS UICollectionView reloadData后找到某个cell 更新某个cell数据
- xampss,远程访问phpmyadmin数据库
- 智能车上位机与下位机通信的例子
- 田忌赛马 364nyoj
- 配置bower组件保存位置
- Linux和Windows下ping