Skip to content

Commit

Permalink
Ensure that service types include WebServlet annotation.
Browse files Browse the repository at this point in the history
  • Loading branch information
gk-brown committed Aug 24, 2024
1 parent 52efa57 commit 0e564fb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions kilo-server/src/main/java/org/httprpc/kilo/WebService.java
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,10 @@ public void init() throws ServletException {

var webServlet = type.getAnnotation(WebServlet.class);

if (webServlet == null) {
throw new ServletException("Missing web servlet annotation.");
}

var urlPatterns = webServlet.urlPatterns();

if (urlPatterns.length == 0) {
Expand Down

0 comments on commit 0e564fb

Please sign in to comment.