简体   繁体   中英

How should I configure application.properties to connect Azure SQL database in spring boot?

我使用mysql db创建了示例Spring Boot应用程序。现在我想连接Azure SQL数据库而不是MySQL。如何编写application.properties?

Here are the Application.properties:

spring.datasource.url=<JDBC Connection String>
spring.datasource.username=<username>
spring.datasource.password=<password>
spring.datasource.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver 

Replace <JDBC Connect String> , <username> , <password> with your SQL database JDBC connection String, login name and password.

You can copy your Azure database connection String from Azure portal: 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM