在使用 jetty 启动项目的时候报错:
2017-12-18 09:45:19.834:WARN:oejuc.AbstractLifeCycle:FAILED org.eclipse.jetty.server.session.SessionHandler@1060b431: java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@eafc191 in org.eclipse.jetty.security.ConstraintSecurityHandler@612fc6eb
java.lang.IllegalStateException: No LoginService for org.eclipse.jetty.security.authentication.BasicAuthenticator@eafc191 in org.eclipse.jetty.security.ConstraintSecurityHandler@612fc6eb
at org.eclipse.jetty.security.authentication.LoginAuthenticator.setConfiguration(LoginAuthenticator.java:44)
at org.eclipse.jetty.security.SecurityHandler.doStart(SecurityHandler.java:376)
at org.eclipse.jetty.security.ConstraintSecurityHandler.doStart(ConstraintSecurityHandler.java:233)
at org.eclipse.jetty.util.compon
百度了一下,原来是 web.xml 配置 有问题:
<!-- <login-config>
<auth-method>BASIC</auth-method>
</login-config> -->
注释掉即可