最新回答 / 雪雨孤島
還是得靠自己,laozi告訴你們正解。Employee中的Department成員變量,在使用ModelDriven之前,必須要Department department = new Department();因?yàn)闆]有實(shí)例化,所以無法對department.did賦值。解決方法:在Employee中添加構(gòu)造方法public Employee(????department = new Department();)就是在用之前實(shí)例化,就可以了。老師挖的坑。。
2017-02-18
最贊回答 / N3verL4nd
<context:property-placeholder location="classpath:jdbc.properties" ignore-unresolvable="true"/>
2017-02-15
已采納回答 / 王若山
--這個(gè)就是返回的你要的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