326.18. Camel SQL スターター
spring-boot ユーザーは、スターターモジュールを利用できます。スターターを使用する場合、spring-boot プロパティーを使用して DataSource を直接設定できます。
# Example for a mysql datasource spring.datasource.url=jdbc:mysql://localhost/test spring.datasource.username=dbuser spring.datasource.password=dbpass spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# Example for a mysql datasource
spring.datasource.url=jdbc:mysql://localhost/test
spring.datasource.username=dbuser
spring.datasource.password=dbpass
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
この機能を使用するには、Spring Boot pom.xml ファイルに次の依存関係を追加します。
必要に応じて、特定のデータベースドライバーも含める必要があります。