• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Rob Spoor
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Carey Brown
Bartenders:

Build a simple web service

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am building a simple webservice with Spring Boot (I am totally new to it). I have a simple endpoint called /product/ and I am getting all my data from a CSV. I am using OpenCSV to read the csv and then GET all the products and products by Ids, but I have a question when it comes to POST, DELETE and PUT operations (for example post a new product). Since I am reading the data from a CSV, shall I use the (From OpenCSV) to save the newly created product? Or shall I simply have my RequestMapping in the controller not being bothered about saving it back in the csv file?

Thank you,

G.
 
Saloon Keeper
Posts: 14661
330
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Geane Norm wrote:Or shall I simply have my RequestMapping in the controller not being bothered about saving it back in the csv file?


Is that an option? If it is, then why do you have PUT/POST/DELETE methods in the first place?
reply
    Bookmark Topic Watch Topic
  • New Topic