How do I dynamically populate a list with data from a JSON file at regular intravels in Spring boot. [@Schedule]How do I create a Java string from the contents of a file?How to parameterize @Scheduled(fixedDelay) with Spring 3.0 expression language?Posting a File and Associated Data to a RESTful WebService preferably as JSONHow do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?How do I write JSON data to a file?How to prettyprint a JSON file?How to configure port for a Spring Boot applicationrxJava Schedulers Use CasesHow to send the Multipart file and json data to spring bootHow to dynamically populate javascript file directly from spring boot java controller in json format?

Have 1.5% of all nuclear reactors ever built melted down?

What is the function of the corrugations on a section of the Space Shuttle's external tank?

Ingress filtering on edge routers and performance concerns

When the Torah was almost lost and one (or several) Rabbis saved it?

Best material to absorb as much light as possible

Can I tell a prospective employee that everyone in the team is leaving?

Why does Mjolnir fall down in Age of Ultron but not in Endgame?

What does the view outside my ship traveling at light speed look like?

Where have Brexit voters gone?

Is the Indo-European language family made up?

Is there an online tool which supports shared writing?

Can the product of any two aperiodic functions which are defined on the entire number line be periodic?

role of -られ, -し, and construction of the phrase

How to attach cable mounting points to a bicycle frame?

Melodic minor Major 9 chords

How to let other coworkers know that I don't share my coworker's political views?

Ethical issue - how can I better document what is happening?

Why were helmets and other body armour not commonplace in the 1800s?

How to respond to upset student?

Which European Languages are not Indo-European?

What is a Power on Reset IC?

How to draw Sankey diagram with Tikz?

Make 24 using exactly three 3s

Parallel fifths in the orchestra



How do I dynamically populate a list with data from a JSON file at regular intravels in Spring boot. [@Schedule]


How do I create a Java string from the contents of a file?How to parameterize @Scheduled(fixedDelay) with Spring 3.0 expression language?Posting a File and Associated Data to a RESTful WebService preferably as JSONHow do I POST JSON data with Curl from a terminal/commandline to Test Spring REST?How do I write JSON data to a file?How to prettyprint a JSON file?How to configure port for a Spring Boot applicationrxJava Schedulers Use CasesHow to send the Multipart file and json data to spring bootHow to dynamically populate javascript file directly from spring boot java controller in json format?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















How do I dynamically populate a list with data from a JSON file at regular intervals in Spring boot.



I'm thinking it can be done using @Schedule.



Task: To create an api which performs some computations on data received from a json file and dynamically change the output as new data adds.



I've been able to create an api which takes in a POST request from Postman which in turn populates my List and performs the computation, but i need to automate this process using a file, which will dynamically get new data.



But could someone please highlight the exact procedure to do this.










share|improve this question






























    0















    How do I dynamically populate a list with data from a JSON file at regular intervals in Spring boot.



    I'm thinking it can be done using @Schedule.



    Task: To create an api which performs some computations on data received from a json file and dynamically change the output as new data adds.



    I've been able to create an api which takes in a POST request from Postman which in turn populates my List and performs the computation, but i need to automate this process using a file, which will dynamically get new data.



    But could someone please highlight the exact procedure to do this.










    share|improve this question


























      0












      0








      0








      How do I dynamically populate a list with data from a JSON file at regular intervals in Spring boot.



      I'm thinking it can be done using @Schedule.



      Task: To create an api which performs some computations on data received from a json file and dynamically change the output as new data adds.



      I've been able to create an api which takes in a POST request from Postman which in turn populates my List and performs the computation, but i need to automate this process using a file, which will dynamically get new data.



      But could someone please highlight the exact procedure to do this.










      share|improve this question
















      How do I dynamically populate a list with data from a JSON file at regular intervals in Spring boot.



      I'm thinking it can be done using @Schedule.



      Task: To create an api which performs some computations on data received from a json file and dynamically change the output as new data adds.



      I've been able to create an api which takes in a POST request from Postman which in turn populates my List and performs the computation, but i need to automate this process using a file, which will dynamically get new data.



      But could someone please highlight the exact procedure to do this.







      java json spring rest spring-boot






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 24 at 3:08







      Sidd

















      asked Mar 24 at 2:59









      SiddSidd

      62




      62






















          1 Answer
          1






          active

          oldest

          votes


















          0














          As @Scheduled is an asynchronous operation it won't produce output for rest response.



          Here could be following ways to process JSON file.



          1. You can define an endpoint to submit JSON file.

          2. Do computations and store in DB and then return the response immediately. But in case JSON file processing takes a long time then you should do computations in a background thread and return "In Progress" response to the user.

          3. Define a separate API for fetching the list of data collected through JSON.





          share|improve this answer























          • Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

            – Sidd
            Mar 24 at 15:47











          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320361%2fhow-do-i-dynamically-populate-a-list-with-data-from-a-json-file-at-regular-intra%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          As @Scheduled is an asynchronous operation it won't produce output for rest response.



          Here could be following ways to process JSON file.



          1. You can define an endpoint to submit JSON file.

          2. Do computations and store in DB and then return the response immediately. But in case JSON file processing takes a long time then you should do computations in a background thread and return "In Progress" response to the user.

          3. Define a separate API for fetching the list of data collected through JSON.





          share|improve this answer























          • Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

            – Sidd
            Mar 24 at 15:47















          0














          As @Scheduled is an asynchronous operation it won't produce output for rest response.



          Here could be following ways to process JSON file.



          1. You can define an endpoint to submit JSON file.

          2. Do computations and store in DB and then return the response immediately. But in case JSON file processing takes a long time then you should do computations in a background thread and return "In Progress" response to the user.

          3. Define a separate API for fetching the list of data collected through JSON.





          share|improve this answer























          • Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

            – Sidd
            Mar 24 at 15:47













          0












          0








          0







          As @Scheduled is an asynchronous operation it won't produce output for rest response.



          Here could be following ways to process JSON file.



          1. You can define an endpoint to submit JSON file.

          2. Do computations and store in DB and then return the response immediately. But in case JSON file processing takes a long time then you should do computations in a background thread and return "In Progress" response to the user.

          3. Define a separate API for fetching the list of data collected through JSON.





          share|improve this answer













          As @Scheduled is an asynchronous operation it won't produce output for rest response.



          Here could be following ways to process JSON file.



          1. You can define an endpoint to submit JSON file.

          2. Do computations and store in DB and then return the response immediately. But in case JSON file processing takes a long time then you should do computations in a background thread and return "In Progress" response to the user.

          3. Define a separate API for fetching the list of data collected through JSON.






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 24 at 5:25









          Gaurav SrivastavGaurav Srivastav

          1,3641614




          1,3641614












          • Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

            – Sidd
            Mar 24 at 15:47

















          • Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

            – Sidd
            Mar 24 at 15:47
















          Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

          – Sidd
          Mar 24 at 15:47





          Thanks you for the information Gaurav. 1. I have created an endpoint [POST request] where i submit Json. 2. Done. 3. Done. Now how would i work through a procedure where it reads the submitted Json file after every few (30) seconds.

          – Sidd
          Mar 24 at 15:47



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55320361%2fhow-do-i-dynamically-populate-a-list-with-data-from-a-json-file-at-regular-intra%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

          Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

          Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript