-
-
Notifications
You must be signed in to change notification settings - Fork 202
Closed
Labels
Milestone
Description
At jooby.io you can find an wrong or outdated(?) example:
import io.jooby.annotation.*;
public class MyController {
@GET
public String sayHi() {
return "Hello Jooby!";
}
}
public class App {
public static void main(String[] args) {
runApp(args, app -> {
app.use(new MyController()); // <<<<<< wrong!
});
}
}Compared to 5.2. Registration the correct way is using the generated code by jooby-apt:
public class App extends Jooby {
{
mvc(new MyController_()); // <<<<< right, underscore-suffix in the classname
}
public static void main(String[] args) {
runApp(args, App::new);
}
}