Drug storage and sales information management system,药品存销信息管理系统
dalian369 / dssims Goto Github PK
View Code? Open in Web Editor NEWDrug storage and sales information management system,药品存销信息管理系统
Drug storage and sales information management system,药品存销信息管理系统
ajax有时候刷新页面后,需要给其中一些元素加上事件,需要写在回调函数里,或者加上asno:false;要不然元素会加不上事件。
异常信息:
nested exception is org.apache.ibatis.reflection.ReflectionException:
There is no getter for property named 'msg' in 'class java.lang.String'
出错地方:
select * from inventory i,administrator a,medicine m, supplier s
where i.A_ID=a.A_ID and i.M_ID=m.M_ID and i.S_ID=s.S_ID
and (m.M_NAME like #{msg} or m.M_TYPE like #{msg})
解决:
去掉sql语句中的if标签限制,或者将where改成.
不能单独使用if标签
运行正常!
当发生404时:
1.在前端检查地址是否正确
2.在控制器检查地址映射是否正确
3.检查参数是否匹配
4.检查mav的地址是否正确
异常信息:
net.sf.json.JSONException: java.lang.reflect.InvocationTargetException
出错地方:
Medicine里有一个java.sql.Date日期类型,存储为json格式时出错
修改:
将 public Date getProductionDate() {
return productionDate();
}
修改为 public String getProductionDate() {
return productionDate.toString();
}
运行正常!
异常信息:
java.lang.IllegalArgumentException: Model object must not be null
原因:
我没有在session里没有存储键值对,在另一个地方却想要获取该key对应的value
作者你好,我这学期刚学了数据库,想借鉴你GitHub药品进销系统的代码,但是没看到数据库的文件,不知道表的格式,新手也不知道怎么运行这个项目,您有空的话能不能占用一点时间指导一下我呢,qq2393583998,谢谢大大
1.关闭mysql所有服务
2.在C:\ProgramData\MySQL\MySQL Server 8.0路径下找到my.ini文件
3..打开添加以下内容
[client]
#设置客户端字符集
default-character-set=utf8
[mysqld]
#设置服务器字符集为utf8
character_set_server=utf8
4.将修改后的文件拷贝到C:\Program Files\MySQL\MySQL Server 8.0
5.重新启动mysql服务器
异常信息:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database.
Cause: java.lang.IllegalArgumentException:
Mapped Statements collection does not contain value for cn.dlain.entities.MedicineMapper.fuzzyQuery
这种错误需要检查映射地址是否正确。
java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer;
需要将老版本mybatis-spring-1.2.3.jar更换成mybatis为“mybatis-3.4.4.jar”
异常信息:
Cause: com.mysql.cj.jdbc.exceptions.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '薛磊'
出错位置:
update customer set
C_NAME=#{name}
and C_PHONE=#{phone}
where C_ID=#{id}
update语句中set后面多个值不能用and连接,改成 逗号
运行正常!
若ajax请求jsp页面,需加上这条语句
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
在使用SqlSessionTemplate时,请使用老版本mybatis-spring-1.2.3.jar。
或者更新mybatis为“mybatis-3.4.4.jar”版本!
在使用错误版本时,会报一个“NoClassDefFoundError .../cursor/cursor”!
异常信息:
Uncaught ReferenceError: 薛磊 is not defined
at HTMLDocument.<anonymous> (login.form:137)
at j (jquery-2.1.0.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.1.0.min.js:2)
at Function.ready (jquery-2.1.0.min.js:2)
at HTMLDocument.I (jquery-2.1.0.min.js:2)
报错地方:
$(function(){
alert("a");
});
不要在js语句里用EL表达式
在使用SqlSessionTemplate时,请使用老版本mybatis-spring-1.2.3.jar。
或者更新mybatis为“mybatis-3.4.4.jar”版本!
在使用错误版本时,会报一个“NoClassDefFoundError .../cursor/cursor”!
异常信息:
JS代码里使用后台发送过来的JSON数据时,发生异常,不能找到 xx not define
原因:
传递json数据一定在RequestMapping里设置传输格式,也就是在后台设置传输的格式,否则前端不能解析。
解决:
@RequestMapping(value="queryPurchasesByThreeId",produces="text/json;charset=UTF-8")
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.