This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin Cookbook and have Ken Kousen on-line!
See this thread for details.
Win a copy of Kotlin Cookbook this week in the Kotlin forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Joe Ess
  • salvin francis

Build a simple web service

 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • 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: 11020
243
  • Mark post as helpful
  • send pies
  • 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?
 
Your mind is under my control .... your will is now mine .... read this tiny ad
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!