码迷,mamicode.com
首页 > 其他好文 > 详细

ssh

时间:2020-02-15 10:02:16      阅读:60      评论:0      收藏:0      [点我收藏+]

标签:表名   除了   event   find   path   ons   jar包   ber   没有   

部署出错

可能是artifacts里面除了maven之外的jar包没导入

hibernate配置文件找不到xml文件

        √
        <property name="mappingLocations" value="classpath:com/bagevent/pojo/*.hbm.xml"/>

        ×
<!--        <property name="mappingLocations">-->
<!--            <list>-->
<!--                <value>com/bagevent/pojo/Userloginlog.hmb.xml</value>-->
<!--            </list>-->
<!--        </property>-->

        x
        <property name="mappingLocations">
            <list>
                <value>classpath:com/bagevent/pojo/*.hmb.xml</value>
            </list>
        </property>

原来这都不是原因,原因是Userloginlog.hmb.xml 我没写,只是个空文件夹,哈哈哈哈哈哈哈哈,有毒,

数据库错误

    User tmp= (User) userDao.find("from user u where u.user_name ='?'",user.getUser_name());
这里 ?要用''引起来,

报错还因为hmb.xml没有把所有字段加进去,
报错 因为Hql和sql不一样,hql 表名要大写,和类名一样,其实并不是表名

find(arg 1);返回list
     User tmp= (User) userDao.find("from User u where u.user_name = ?","hiber").get(0);返回一个

ssh

标签:表名   除了   event   find   path   ons   jar包   ber   没有   

原文地址:https://www.cnblogs.com/zhuob/p/12310416.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!