As you know, is @RequestMappingused to intercept a HttpServletRequest.
I want to know how @Controller @RequestMappingtogether a request from a client can bind to a specific method inside the java class?
I want to write a similar Java application to perform the same function. Imagine we have a class like this:
@Actor
public class JavaForever {
@Department(value="IT")
public void departmentIT(){...}
@Department(value="Physic")
public void departmentPhysic(){...}
}
And the StudentBean class:
public class StudentBean {
private String department;
private Integer age;
}
and finally, we have a test class as follows:
public class TestApplication {
public static void main(String[] agrs){
List<StudentBean> allStudents = new TestApplication().getStudentFromDatabaseMethod();
}
}
As you can see, it getStudentFromDatabaseMethod()returns List< StudentBean>, now the question arises, how to make this method get an interception with our annotation @Department, which is in the JavaForeverclass before, and returns any value ...
How can we do this???
Mehdi