java - how to hook up spring mvc to a dynamic list of data -


so, i'm new spring , i'm following tutorial on spring mvc: http://jeromejaglale.com/doc/spring4_tutorial/mvc_web_application

that shows how create website using spring mvc , display list of cars. have working want extend website isn't displaying static list of cars.

instead, want carservice more of structure can updated dynamically cars can added , deleted. have carservice defined bean , grab when controller asks it. issue i'm running into, how startup web server , start spring application start carservice can add , remove separately web app?

any guidance/tutorials on best way approach situation appreciated.

in tutorial, data (cars) hardcoded in carservice simplify.

if want add cars dynamically (or basic operations data: crud - create, read, update, delete) , display them, should:

  1. implement class dao (data access object) cars, instead carservice hardcored data.
  2. create forms add cars (or crud) in yours jsp views.

ad 1. can store data in database (eg. mysql, postgresql) or file (eg. xml, binary) or web service (soap or rest). if use database can jdbc (with sql query add , retrieve data database) or hibernate (it's orm - object-relational mapping, automatically create objects).

you can use tutorial eg.:


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -