我有1錯誤:Bean屬性 'SessionFactory的' 不可寫無效或者和setter方法
Invalid property 'sessionFactory' of bean class [com.aptech.mavenspringmvc.dao.StudentDAOImpl]: Bean property 'sessionFactory' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
文件DAO實現
@Repository
public class StudentDAOImpl implements StudentDAO{
@Autowired
public SessionFactory session;
文件DAO
@Service
public class StudentServiceImpl implements StudentService{
//@Autowired
public StudentDAO studao;
public void setStudao(StudentDAO studao) {
this.studao = studao;
}
public StudentDAO getStudao() {
return studao;
}
文件控制器
@Controller
public class StudentController {
// @Autowired
private StudentService stuSer;
感謝您的回答,但仍然沒有與此錯誤 –
更新我的答案 – Helios