Skip to content

can't resolve @StaticRoutes in application controller #6

@mcmug8

Description

@mcmug8

Hi,

for some reason, my application.java can't be resolved with routes annotation. Here is my example code for my application.java. Maybe I am missing the import somewhere.

@StaticRoutes({
@ServeStatic(value="/public/", directory="public")
})
public class Application extends Controller {
@Any(value="/", priority=100)
public static void index() {
forbidden("Reserved for administrator");
}
@put(value="/", priority=2, accept="application/json")
public static void hiddenIndex() {
renderText("Secret news here");
}
@post("/ticket")
public static void getTicket(String username, String password) {
String uuid = UUID.randomUUID().toString();
renderJSON(uuid);
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions