不能添加數據到表中,報錯java.lang.ClassCastException

                                Students s1 = new Students("S0000001","张三丰","男",new Date(),"武当山"); Students s2 = new Students("S0000002","郭靖","男",new Date(),"桃花岛"); Students s3 = new Students("S0000003","黄蓉","女",new Date(),"桃花岛");

session.save(s1);

                                session.save(s2);

session.save(s3);

tran.commit();

                                sessionFactory.close();

什麼回事啊?誰能解答一下。



慕少9057559
浏览 1151回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

Java