The Hibernate SessionFactory is always null when using Spring dependency injection
I am getting a NullpointerException on my save method in CityDaoImpl. Seems that sessionFactory is not autowired since on debugging it was revealed that sessionFactory is never injected in CityDaoI...
stackoverflow.com
위의 방법도 있지만 나는 controller에서 autoweird(new 대신)객체 선언를 안해서 그렇다.
'WEB BANK-END > SPRING' 카테고리의 다른 글
[Spring] mvc 패턴 파라미터 받는 법 (0) | 2020.09.01 |
---|---|
[JSTL] cannot convert of type class java.util.arraylist to class java.lang.long 에러 해결법 (0) | 2020.09.01 |
[Spring] java.lang.IllegalStateException: Ambiguous mapping found. Cannot map ‘***Controller’ bean method – 에러 해결방법 (0) | 2020.09.01 |
[JSTL] 코어 태그 모음 (0) | 2020.09.01 |
[JSTL] 스프링 if문 (0) | 2020.08.31 |