fixed errors due to spring-5 version upgrade

This commit is contained in:
Gerardo Roza
2019-12-27 11:06:26 -03:00
parent f3beab54b5
commit a7d2c705c7
7 changed files with 18 additions and 18 deletions

View File

@@ -14,7 +14,7 @@ import java.io.PrintWriter;
public class MyBasicAuthenticationEntryPoint extends BasicAuthenticationEntryPoint {
@Override
public void commence(final HttpServletRequest request, final HttpServletResponse response, final AuthenticationException authException) throws IOException, ServletException {
public void commence(final HttpServletRequest request, final HttpServletResponse response, final AuthenticationException authException) throws IOException {
response.addHeader("WWW-Authenticate", "Basic realm=\"" + getRealmName() + "\"");
response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);
final PrintWriter writer = response.getWriter();
@@ -22,7 +22,7 @@ public class MyBasicAuthenticationEntryPoint extends BasicAuthenticationEntryPoi
}
@Override
public void afterPropertiesSet() throws Exception {
public void afterPropertiesSet() {
setRealmName("Baeldung");
super.afterPropertiesSet();
}