Breaking News

java – How does Springboot use a database instead of a

I want to achieve is that springboot gets the property values configured in the database to complete the automatic configuration. Just like using

It is possible to programatically override Spring properties at startup. This would be a good place to retrieve the properties from any database that you whish and set them.

Here is an example (copy/pasted from this answer) . You would have to add getting the configuration from the database

public class Demo40Application{
  public static void main(String[] args){
    SpringApplication application = new SpringApplication(Demo40Application.class);

    Properties properties = new Properties();
    properties.put("server.port", 9999);

About rankhawks

Check Also

php – How do I delete a row from my database based on a post value within the row

Questions: I have a dynamic form where users can add rows and submit that data …

php – How to retrieve data from database and able to edit in summernote editor?

Questions: I’m facing a problem and i couldn’t find a solution to solve it.My problem …

javascript – Saving div innerText directly to database

Questions: I have a simple div with contenteditable and I want to store its value …

How verify mysql database connection from another file php

Questions: I’ve created a form where the user can add his database name, username, password, …

c# – What is the role of solution folder in an visual studio solution?-Exceptionshub

Questions: I created a new visual studio solution with a new project. So my folder …

Leave a Reply

Your email address will not be published. Required fields are marked *