user509981
user509981

Reputation:

Route file doesn't route to the right controller, once updated

I have this problem :

I have my route file, containing a valid route to a controller. I compile, I have no error. I send a request, it calls the right method on the right controller, everything is working.

Then I changed the name of that controller and changed it in the route file. I compile, I have no error. But when I send a request (I see it via my proxy), the request is never transmitted to the controller.

If I change the name of the controller back to the first one, it works !!

I have reboot and clean-all, but nothing works, do you have an idea ?

Edit

routes

## Créer le social user
POST    /v1/current_user     api.v1.controllers.CurrentUserController.create()

CurrentUserController

public class CurrentUserController extends Controller {
    @Transactional
    @CheckSecurity
    public static Result create() {
        return ok();
    }
}

Didn't mentionend it but I'm using play 2.1.1 @Transactional is because I use JPA instead of Ebean @CheckSecurity calls a plugin I have written But even if I didn't set this two annotations, it works when the name of the controller is UserController, but since I changed it to CurrentUserController, it doesn't work.

Upvotes: 1

Views: 103

Answers (1)

nightograph
nightograph

Reputation: 2249

do a play clean and also clean all the class files, sometimes play is not good in cleaning after itself.

i would do a find . | grep classes and manually delete all the class folders

Upvotes: 1

Related Questions