问题描述
- 为什么我的配置文件链接的是A数据库可是程序内部却指向了其他的数据库呢?
-
贴一下配置文件
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">org.hibernate.dialect.MySQLDialect
jdbc:mysql://localhost:3306/zoodb
root
rootcom.mysql.jdbc.Driver
true
20
2
120
100
120
2<property name="myeclipse.connection.profile">mysql</property> <mapping resource="com/zoo/bean/system/Users.hbm.xml" /> <mapping resource="com/zoo/bean/system/Role.hbm.xml" /> <mapping resource="com/zoo/bean/system/Tright.hbm.xml" /> <mapping resource="com/zoo/bean/system/RoleTright.hbm.xml" /> <mapping resource="com/zoo/bean/system/UsersType.hbm.xml" /> <!-- 售票实体类 --> <mapping resource="com/zoo/bean/ticket/Part.hbm.xml" /> <mapping resource="com/zoo/bean/ticket/PlayInfo.hbm.xml" /> <mapping resource="com/zoo/bean/ticket/Project.hbm.xml" /> <mapping resource="com/zoo/bean/ticket/SaleTarget.hbm.xml" /> <mapping resource="com/zoo/bean/ticket/Site.hbm.xml" /> <mapping resource="com/zoo/bean/ticket/Ticket.hbm.xml" /> <mapping resource="com/zoo/bean/ticket/TicketType.hbm.xml" />
下面的是报错!
org.springframework.dao.InvalidDataAccessResourceUsageException: could not execute query; SQL [select tickettype0_.id as col_0_0_, (select project1_.pname from baobi.project project1_ where project1_.id=tickettype0_.project_id) as col_1_0_, tickettype0_.id as id11_, tickettype0_.type_name as type2_11_, tickettype0_.code as code11_, tickettype0_.price as price11_, tickettype0_.ticket_valid as ticket5_11_, tickettype0_.project_id as project6_11_, tickettype0_.do_user as do7_11_, tickettype0_.do_time as do8_11_, tickettype0_.rate as rate11_, tickettype0_.is_team as is10_11_ from baobi.ticket_type tickettype0_]; nested exception is org.hibernate.exception.SQLGrammarException: could not execute query自己捣鼓了将近一个星期还是没有解决,所以上来求助各位大神!
还要什么文件我将第一时间贴出来