java - Where to put business logic in spring mvc framework? -


i dont know put business logic in spring mvc because i'm new it. have clue on because of lack in knowledge in spring mvc, don't start. ask if knows can tutorial on or complete sample of spring mvc web application has business logic on it? anyways, business logic talking about database handling :)

@controller classes serve c mvc. note real controller in spring mvc dispatchservlet use specific @controller class handle url request.

@service classes should serve service layer. here should put business logic.

@repository classes should serve data access layer. here should put crud logic: insert, update, delete, select.

@service, @repository , entity classes m mvc. jsp , other view technologies conform v mvc.

@controller classes should have access @service classes through interfaces. similar, @service classes should have access other @service classes , specific set of @repository classes through interfaces.


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -