Fix the compiling issue after adding hibernate and spring mvc