Initialization of the Spring boot application



  • I would like to add all the OBD data to the List during the re-establishment of the server with the annex, in order to follow up with them b requests for OBD when updating the page. When a request is made to OBD in the designer or static{} Remove the NPE, the List to which I'm requesting data from the BDE empty.

    I understand that the request is received before the OBD connection is set. How do I get it? Is it worth doing that if we suggest that a million data lines can be located in the OBD system?
    More grateful.



  • When a request is made to the OBD designer or static {} removes NPE

    This is logical and expected behaviour: the static block is performed if I remember correctly when JVM downloads the class definition (this is due to the fact that .classTo memory. The designer is performed in the construction of the bin, but before Spring checks out all dependence.

    How do I get it?

    There are many options, but I advise, add a method with a code for downloading the OBD data and annotated it. http://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/beans.html#beans-postconstruct-and-predestroy-annotations

    Is it worth doing that if we suggest that a million data lines can be located in the OBD system?

    Probably not. Data will be remembered and will probably not be used all the time.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2