Skip to content

Commit

Permalink
Add setter for detected route
Browse files Browse the repository at this point in the history
  • Loading branch information
IshikaDawda committed Jun 5, 2024
1 parent 6b04bed commit d0952fa
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ public String getRoute() {
return route;
}

public void setRoute(String route){
String formatedRoute = StringUtils.removeEnd(StringUtils.prependIfMissing(route, StringUtils.SEPARATOR), StringUtils.SEPARATOR);
if(!StringUtils.isEmpty(formatedRoute)) {
this.route = formatedRoute;
}
}

public void setRoute(String segment, boolean isAlreadyServlet) {
// remove servlet detected route if another framework detected;
if (isAlreadyServlet){
Expand Down

0 comments on commit d0952fa

Please sign in to comment.