我有一個非常簡單的 Spring Boot 應用程序和 application.properties,現在我想轉到 application.yml這是 application.yml 文件:spring:
datasource:
url: jdbc:mysql://localhost:3306/employee_directory
username: student
password: Password123所以我刪除了 application.properties 文件并編寫了 application.yml 文件。如果我運行該應用程序,我會收到此異常:我想我需要對我的代碼進行其他修改才能使用此 application.yml 文件,但我不知道該怎么做?
如何在 Spring Boot 中將 application.properties 轉換為
慕蓋茨4494581
2023-06-04 14:58:38