Exception in thread "main" org.springframework.jdbc.UncategorizedSQLException: Hibernate operation: Cannot open connection; uncategorized SQLException for SQL [???]; SQL state [null]; error code [0]; Cannot load JDBC driver class 'com.mysql.jdbc.Driver'; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
这是因为ssh框架或ssm框架的spring托管驱动没写
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver">
</property>
<property name="url"
value="jdbc:sqlserver://localhost;databaseName=xsxkWzb"></property>
<property name="username" value="sa"></property>
<property name="password" value="123456"></property>
</bean>