Home >Database >Mysql Tutorial >javaweb-我的java web项目部署到linux下遇到的mysql问题

javaweb-我的java web项目部署到linux下遇到的mysql问题

WBOY
WBOYOriginal
2016-06-06 09:41:201581browse

mysqljavaweblinux

//查询当前店铺 -自定义类别
public List findShopCovertype(String shopCode){
String sql = "SELECT A.shop_code,A.cover_type_code,A.cover_type_name FROM shop_cover_type A WHERE A.shop_code = ?";
final List list = new ArrayList();
shopcoverTypeDao.getJdbcTemplate().query(sql, new Object[]{shopCode},new RowCallbackHandler(){
@Override
public void processRow(ResultSet rs) throws SQLException {
// TODO Auto-generated method stub
ShopCoverType sct = new ShopCoverType();
sct.setCoverTypeCode(rs.getString("cover_type_code"));
sct.setShopCode(rs.getString("shop_code"));
sct.setCoverTypeName(rs.getString("cover_type_name"));
list.add(sct);
}

});
return list;
}

<code>这是我本地的一个方法 在linux下会报错 看我的sql 是    String sql = "SELECT A.`shop_code`,A.`cover_type_code`,A.`cover_type_name` FROM `shop_cover_type` A WHERE A.`shop_code` = ?";from shop_cover_type在linux下 hibernate 查的是 from cx. shop_cover_type因此会报错找不到这个表 (Table 'cx.shop_cover_type' doesn't exist)很多表都是这样前面多了个 cx.第一次把项目布到linux 遇到很多问题 谢谢大jia</code>

图片说明

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn