package net.mindoverflow.comments.webapp; import net.mindoverflow.comments.webapp.controllers.CommentController; import net.mindoverflow.comments.webapp.controllers.CommentsController; import net.mindoverflow.comments.webapp.controllers.LoginController; import net.mindoverflow.comments.webapp.controllers.RegisterController; import ro.pippo.controller.ControllerApplication; import ro.pippo.core.route.TrailingSlashHandler; import java.util.HashMap; public class WebServer extends ControllerApplication { public static final HashMap userAndPassword = new HashMap<>(); public static final HashMap jwtAndUser = new HashMap<>(); public static final HashMap userAndComment = new HashMap<>(); @Override public void onInit() { addControllers(new LoginController(), new RegisterController(), new CommentsController(), new CommentController()); ANY("/.*", new TrailingSlashHandler(false)); // remove trailing slash } }