Number Service
NumberService.java
- Most of the configuration is done via annotations itself. The code just does the business logic (i.e to add 2 numbers)
- Path("/number/") annotation specifies the relative URI path that this class will serve is /number/
- Component annotation specifies that this class needs to be auto-detected when spring does the annotation based scan
- Scope("singleton") annotation specifies that this class needs to be a singleton instance in spring
- POST annotation specifies that the method will handle HTTP POST requests
- Consumes( { "application/x-www-form-urlencoded" }) annotation specifies that the method will handle requests with media type application/x-www-form-urlencoded
- Produces( { "text/plain" }) annotation specifies that the method will respond with the media type text/plain
- Path("add") annotation specifies the relative URI path that this method will serve is add

- Tags:
Who's online
There are currently 0 users and 1 guest online.
Who's new
- Saravana Peruma...
Recent comments
29 weeks 4 days ago
33 weeks 17 min ago
47 weeks 3 days ago
49 weeks 5 days ago
1 year 6 weeks ago
1 year 37 weeks ago
2 years 13 weeks ago
2 years 14 weeks ago