• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

How to handle Controller class in Spring

 
Ranch Hand
Posts: 88
IBM DB2 Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, one quick question. Based on my current project architecture I have only one Controller class to which my UI is connecting by @RequestMapping (value = "/<some string>", method=RequestMethod.GET). Problem is day by day that controller class is getting bigger as our UI requirements are changing. Please suggest me what will be the best way to break this controller class into small sub-classes.

Thank you so much.
 
Ranch Hand
Posts: 138
1
jQuery Spring Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

You can create different controller classes as per the requirement like one controller can only handle the navigation requests, one controller can handle specific functionality request, other handle another request.
In case of handling functionality related reuest where you are expose those as rest service, use generic pattern at class level.


Thanks,
Atul
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic