trying to integrate hibernate and spring ,I ran into this error
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanC
This is happening because you have both
and
The first line will auto-discover and register a SchoolController for you. By explicitly declaring another one, you get a duplicate, and the url-mapping will clash.
You need to either remove the , or remove the explicit bean definitions for the controller and the DAO. If you do the latter, then you'll need to use autowiring to inject their dependencies.