从MySQL移动到SQL Server后显示错误
我创建了一个项目,它与MySQL配合得很好。 我需要使用SQL Server而不是MySQL,下面显示异常:从MySQL移动到SQL Server后显示错误,mysql,sql-server,Mysql,Sql Server,我创建了一个项目,它与MySQL配合得很好。 我需要使用SQL Server而不是MySQL,下面显示异常: com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred performing resource injection on managed bean ManageUserBean 知道我对文件spring.xml做了如下更改,您能告诉我缺少什么吗 <?xml version="1.0" encodin
com.sun.faces.mgbean.ManagedBeanCreationException: An error occurred
performing resource injection on managed bean ManageUserBean
知道我对文件spring.xml
做了如下更改,您能告诉我缺少什么吗
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="employeeDAO" class="com.journaldev.spring.jdbc.dao.EmployeeDAOImpl">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="employeeDAOJDBCTemplate" class="com.journaldev.spring.jdbc.dao.EmployeeDAOJDBCTemplateImpl">
<property name="dataSource" ref="dataSource" />
</bean>
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />
<property name="url" value="jdbc:sqlserver://localhost:1433;database=springDBA"/>
<property name="username" value="hello" />
<property name="password" value="world" />
</bean>
</beans>
感谢您的回复。请提前感谢。在通过此线程提供有关我的问题的更多详细信息后。
我找到了解决方案:我必须避免在SQL Server上调用像“User”这样的实体,因为它被认为是此数据库中的保留关键字。也许这会有所帮助。对不起,Iminiki,这个问题与JSF无关:在控制台上,它是显示的第一个异常,但是这个异常是另一个异常的结果,这个异常由这个线程解释