已采纳回答 / punk小调
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="hibernateProperties"> <props> &...
2017-06-13
已采纳回答 / Arong灬苍澜
Caused by: java.lang.NumberFormatException: For input string: "20 ",这个20后面多了个空格
2017-05-17
已采纳回答 / 南瓜头先生
public Employee findByUsernameAndPassword(Employee employee) { Session session = this.getSessionFactory().openSession(); Transaction tx = session.beginTransaction(); String hql2 = "from Employee e where e.username= '"+employee.getUsername()+"' an...
2017-05-11
已采纳回答 / Justicer
第一段倒数第十行 : Caused by: java.io.FileNotFoundException: class path resource [com/muke/Department/domain.hbm.xml] cannot be opened because it does not exist可能是sessionFactory找不到com/muke/Department/路径下domain.hbm.xml文件
2017-03-15
已采纳回答 / 慕粉4279450
No result defined for action com.design.action.admin.AdminAction and result input - action - file:/D:/Design/apache-tomcat-6.0.20/webapps/Design/WEB-INF/classes/struts.xml:13:59检查struts.xml中的class
2017-03-13
已采纳回答 / 王若山
--这个就是返回的你要的list,查询语句你可以自己更改String hql = "from Employee where eid = ?";List<Employee> emps = (List<Employee>) this.getHibernateTemplate().find(hql,eid);if(emps.size() > 0){ return emps.get(0);}--employeeService.findById(employee.getEid()...
2017-02-09
最新回答 / 慕粉3606918
应该是action的作用域没有设置成prototype,默认是单例模式,在提示错误页面基础上输入正确密码会跳转到自身的页面,错误信息仍然存在。<!-- 配置Action的类 --> <bean id="employeeAction" class="com.ssh.action.EmployeeAction" scope="prototype"> <property name="employeeService" ref="employeeService"></pr...
2017-01-08