• 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:

Need advice to execute a common mehtod

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In spring MVC web application we have multiple controllers exposed as REST controller using @ controller. All the services in the controller created using @RequestMapping are calling a java method written in a different class - In short one method is invoked from different -2 services written in controllers . Can you please advice this is the proper way to execute a common method or is there any alternative available ?

 
Greenhorn
Posts: 1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please, is your question about calling methods from different class or just declaring and executing a runnable method?

if yes you can check https://youtu.be/q-VxJN2UyL0
 
pari Nagda
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is about calling a common method not methods from multiple locations i.e service methods in controllers .
 
reply
    Bookmark Topic Watch Topic
  • New Topic