0

I have a bunch of RESTful web services(80) with @GET and @PUT methods. I want to add an @OPTIONS method to each service. Instead of manualy writing @OPTIONS method for each service I want to be able to inject them in the services. What is the best way to do this?

Abhinav Sarkar
  • 23,534
  • 11
  • 81
  • 97
user1457881
  • 321
  • 2
  • 3
  • 10

1 Answers1

0

I don't know exaclty your environment, but i think the best way in technologies I use is to specify the "auto-scan" property in the configuration file, the declaration of this property differs a little from a technology to another one, but the idea remain the same : all componants are scanned at the beginning of deploiment sorry for my english :) but i hope this response helps you

maouven
  • 31
  • 1
  • 7
  • Thanks a lot for the answer. I'm using eclipse, and I have no Idea how to do what you just said. can you help me more – user1457881 Jul 17 '12 at 03:14
  • It differs depending on what you are using as technology, for example in a spring environment, you have just to add in the application-config.xml a line whith indicate to spring the package containing your annotated classes, methodes and attributes; – maouven Jul 17 '12 at 13:48