我正在嘗試在 Spring Boot 和 Spring Cloud 上構(gòu)建一個示例應(yīng)用程序。我已經(jīng)在位于我桌面的config.properties屬性文件中編寫了我的數(shù)據(jù)庫和休眠配置,我希望我的 Spring Boot 能夠使用這個配置。我的項目有 3 個模塊應(yīng)用程序接口數(shù)據(jù)層服務(wù)層這是我在API的application.property文件中提到的代碼spring.profiles.active=本機 spring.cloud.config.server.native.searchLocation=C:/Users/DEV/Desktop/configuration/config.properties并且DataLayer和ServiceLayer的屬性文件為空但是當(dāng)我運行 API 時,我收到以下錯誤***************************APPLICATION FAILED TO START***************************Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.Reason: Failed to determine a suitable driver classAction:Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).Process finished with exit code 1任何人都可以幫助我解決這個錯誤。提前致謝。
添加回答
舉報
0/150
提交
取消