我有来自外部配置web-service的jdbc属性文件在spring boot中为了设置mysql道具,将它们添加到application.properties很容易:
spring.datasource.url=jdbc:mysql://localhost/mydb
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
Run Code Online (Sandbox Code Playgroud)
我怎么能在我的应用程序中重写那些程序?
Spring-batch道具同样如此:
database.driver=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost/mydv
database.username=root
database.password=root
Run Code Online (Sandbox Code Playgroud)