Skip to content

Commit

Permalink
test: Use 'urlmapping' instead of 'vaadin' for clarity (#13800)
Browse files Browse the repository at this point in the history
Also reduce log spam from serialization errors
  • Loading branch information
Artur- authored May 19, 2022
1 parent 358ae99 commit 9c57186
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server.port=8888
logging.level.org.springframework.security=DEBUG
server.servlet.context-path=/context

server.servlet.session.persistent=false
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
public class Application
extends com.vaadin.flow.spring.flowsecurity.Application {

protected static final String URL_MAPPING = "/urlmapping";

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
Expand All @@ -38,13 +40,13 @@ protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
throws ServletException, IOException {
request.getRequestDispatcher(
request.getRequestURI().substring(7))
request.getRequestDispatcher(request.getRequestURI()
.substring(URL_MAPPING.length()))
.forward(request, response);
}
});
registrationBean.addUrlPatterns("/vaadin/public/images/*",
"/vaadin/public/profiles/*");
registrationBean.addUrlPatterns(URL_MAPPING + "/public/images/*",
URL_MAPPING + "/public/profiles/*");
registrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return registrationBean;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
server.port=8888
logging.level.org.springframework.security=DEBUG
vaadin.urlMapping=/vaadin/*

vaadin.urlMapping=/urlmapping/*
server.servlet.session.persistent=false
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
public class AppViewIT extends com.vaadin.flow.spring.flowsecurity.AppViewIT {
@Override
protected String getUrlMappingBasePath() {
return "/vaadin";
return "/urlmapping";
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
server.port=8888
logging.level.org.springframework.security=DEBUG

server.servlet.session.persistent=false
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ logging.level.org.springframework.security=DEBUG
logging.level.com.vaadin.flow.server.connect.auth=DEBUG
logging.level.com.vaadin.flow.server.auth=DEBUG
server.servlet.context-path = /context
server.servlet.session.persistent=false
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
public class Application
extends com.vaadin.flow.spring.fusionsecurity.Application {

protected static final String URL_MAPPING = "/urlmapping";

public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
Expand All @@ -37,15 +39,14 @@ protected void doFilterInternal(HttpServletRequest request,
HttpServletResponse response,
FilterChain filterChain)
throws ServletException, IOException {
request.getRequestDispatcher(
request.getRequestURI().substring(7))
request.getRequestDispatcher(request.getRequestURI()
.substring(URL_MAPPING.length()))
.forward(request, response);
}
});
registrationBean.addUrlPatterns("/vaadin/public/images/*",
"/vaadin/public/profiles/*");
registrationBean.addUrlPatterns(URL_MAPPING + "/public/images/*",
URL_MAPPING + "/public/profiles/*");
registrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
return registrationBean;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ server.port=9999
logging.level.org.springframework.security=DEBUG
logging.level.com.vaadin.flow.server.connect.auth=DEBUG
logging.level.com.vaadin.flow.server.auth=DEBUG
vaadin.urlMapping = /vaadin/*
vaadin.urlMapping = /urlmapping/*
server.servlet.session.persistent=false
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class SecurityIT

@Override
protected String getUrlMappingBasePath() {
return "/vaadin";
return "/urlmapping";
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ server.port=9999
logging.level.org.springframework.security=DEBUG
logging.level.com.vaadin.flow.server.connect.auth=DEBUG
logging.level.com.vaadin.flow.server.auth=DEBUG
server.servlet.session.persistent=false

0 comments on commit 9c57186

Please sign in to comment.