fixed errors due to spring-5 version upgrade
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user