I’m looking for java framework which can generate javascript code to access backend beans. For example, I have spring service TestService:
public interface TestService {
public static class UserDTO {
public String username;
public Date birthday;
}
public List<UserDTO> findAllUsersByUsername(String username);
}
And I want to call it from javascript like: console.print(testService.('test')[0].username); without writing any controller or ajax/xhr stuff. Just run ant/maven/etc task and include js file into html page.
Is that framework already exists?
Thanks you in advance.
Dwr (http://directwebremoting.org) is what I’m looking for.