[英]Spring Boot application not connecting with Cloud Config Server
[英]Connecting SQL Server with Spring Boot application
我正在尝试将我的 SQL 服务器与 Spring 启动应用程序连接,但它会产生以下错误:
org.springframework.beans.factory.BeanCreationException:在 class 路径资源 [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class] 中创建名称为“entityManagerFactory”的 bean 时出错:通过工厂方法进行 Bean 实例化失败; 嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]:工厂方法“entityManagerFactory”抛出异常; nested exception is java.lang.RuntimeException: Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, jdbc:sqlserver://localhost;databaseName:CourseAPI;integratedSecurity:true;
以下是 application.properties 中的数据源配置(CourseAPI 是我创建的数据库):
spring.datasource.url=jdbc:sqlserver://localhost;databaseName:CourseAPI;integratedSecurity:true;
以下是 SQL 服务器中显示的连接字符串,正在使用 windows 身份验证:
服务器=localhost;数据库=master;Trusted_Connection=True;
我在这里被打了一天多。 任何形式的帮助将不胜感激。 提前致谢。
我正在尝试将我的 SQL 服务器与 Spring 启动应用程序连接,但它会产生以下错误:
org.springframework.beans.factory.BeanCreationException:在 class 路径资源 [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class] 中创建名称为“entityManagerFactory”的 bean 时出错:通过工厂方法进行 Bean 实例化失败; 嵌套异常是 org.springframework.beans.BeanInstantiationException:无法实例化 [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]:工厂方法“entityManagerFactory”抛出异常; nested exception is java.lang.RuntimeException: Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, jdbc:sqlserver://localhost;databaseName:CourseAPI;integratedSecurity:true;
以下是 application.properties 中的数据源配置(CourseAPI 是我创建的数据库):
spring.datasource.url=jdbc:sqlserver://localhost;databaseName:CourseAPI;integratedSecurity:true;
以下是 SQL 服务器中显示的连接字符串,正在使用 windows 身份验证:
服务器=localhost;数据库=master;Trusted_Connection=True;
我在这里被打了一天多。 任何形式的帮助将不胜感激。 提前致谢。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.