Advertisement
Guest User

Untitled

a guest
Aug 2nd, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.50 KB | None | 0 0
  1. <dependency>
  2. <groupId>com.microsoft.sqlserver</groupId>
  3. <artifactId>mssql-jdbc</artifactId>
  4. <version>6.2.1.jre8</version>
  5. </dependency>
  6.  
  7. org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.microsoft.sqlserver.jdbc.SQLServerDriver
  8.  
  9. <dependencies>
  10. <dependency>
  11. <groupId>org.springframework.boot</groupId>
  12. <artifactId>spring-boot-starter-data-jpa</artifactId>
  13. </dependency>
  14. <dependency>
  15. <groupId>org.springframework.boot</groupId>
  16. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  17. </dependency>
  18. <dependency>
  19. <groupId>org.springframework.boot</groupId>
  20. <artifactId>spring-boot-starter-web</artifactId>
  21. </dependency>
  22.  
  23. <dependency>
  24. <groupId>com.microsoft.sqlserver</groupId>
  25. <artifactId>mssql-jdbc</artifactId>
  26. <version>6.2.1.jre8</version>
  27. </dependency>
  28.  
  29. <dependency>
  30. <groupId>com.h2database</groupId>
  31. <artifactId>h2</artifactId>
  32. <scope>runtime</scope>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.springframework.boot</groupId>
  36. <artifactId>spring-boot-starter-test</artifactId>
  37. <scope>test</scope>
  38. </dependency>
  39. </dependencies>
  40.  
  41. spring.h2.console.enabled=true
  42. spring.h2.console.path=/console
  43. spring.datasource.platform=h2
  44.  
  45. # production profile
  46. spring.datasource.url=jdbc:sqlserver://spring-boot-intro.database.windows.net:1433;database=spring-boot-intro;user=fabio@spring-boot-intro;password={your_password_here};encrypt=true;trustServerCertificate=false;hostNameInCertificate=*.database.windows.net;loginTimeout=30;
  47. spring.datasource.username=*my username*
  48. spring.datasource.password=*my password*
  49. spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
  50.  
  51. # crud
  52. spring.jpa.hibernate.ddl-auto=create-drop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement