Example project illustrating:
-
how to implement REST services with Spring
- simple
- with path variable
- with request parameter
- returning JSON response
-
how to use Spring AOP with custom annotation as point cut
-
how to send parameters to the advice
-
how to get annotated method parameters
-
how to access return value of the advised method
-
how to use log4j2 with JSON layout
- Import in Eclipse as maven project
- Deploy in Tomcat 8.0 under Eclipse
- See JUnit tests
- URL for the rest endpoints: http://localhost:8080/spring-rest-aop/rest/greet or http://localhost:8080/spring-rest-aop/rest/greet/John or http://localhost:8080/spring-rest-aop/rest/greeting?name=John