从春天BOOT连接到我的SQL数据库

时间:2017-10-01 23:43:28

标签: mysql azure spring-boot

我正在尝试从我的spring BOOT应用程序连接我在Azure中部署的SQL数据库。下面是我的application.properties文件。当我运行应用程序时,它会抛出一些hibernate异常,并且它说的是最大连接数。即使我关闭所有连接并更新了我的密码,但它仍然是相同的错误。任何人都可以帮助我以正确的方式做到这一点。  请指导我  我是否需要添加任何云依赖项?

spring.datasource.url=jdbc:mysql://**Datasource**/Databasename
spring.datasource.username=*****
spring.datasource.password=*****
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = update
spring.jpa.hibernate.format_sql=true
spring.jpa.hibernate.dialect=org.hibernate.dialect.MySQLDialect

例外情况

1. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User '*******' has exceeded the 'max_user_connections' resource (current value:4)
2.Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]

0 个答案:

没有答案