Spring Boot: Use database and application.properties for configuration

后端 未结 7 1553
无人及你
无人及你 2020-12-29 15:52

I need to save the configuration of the Spring Boot application in the database.

Is it possible to store the database information in the application.properties

7条回答
  •  忘掉有多难
    2020-12-29 16:14

    Spring Cloud Config Server supports JDBC (relational database) as a backend for configuration properties.

    Spring boot Config Server will pull properties from a SQL Database on startup of your application. The database needs to have a table called PROPERTIES.

    Following the link for more details:

    https://cloud.spring.io/spring-cloud-config/multi/multi__spring_cloud_config_server.html

    refer section: 2.1.7 JDBC Backend

提交回复
热议问题