страница ошибок WhiteLabel
Это приложение не имеет явного отображения для/ошибки
Я пытаюсь выполнить базовый проект JSP с Spring Boot с Gradle. целевая страница. < /p>
Я получаю это < /p>
Filter negotiateSecurityFilter was not registered (disabled)
< /code>
Также я отлаживаю пример проекта, где он работает и мой, в < /p>
public void invokeAndHandle(ServletWebRequest webRequest, ModelAndViewContainer mavContainer, Object... providedArgs)
< /code>
Метод, работающий WebRequest содержит сеанс и пользователь < /p>
uri=/;client=0:0:0:0:0:0:0:1;session=0203525A1982FBB20DB79829EA8408AD;user=XX\abcduser
< /code>
Но в моем проекте есть только URI. В запросе также я вижу принципал в образце проекта, но не мой. @Configuration
public class WaffleSecurityConfig {
@Bean
public FilterRegistrationBean waffleFilter() {
FilterRegistrationBean registration = new FilterRegistrationBean();
registration.setFilter(new NegotiateSecurityFilter());
return registration;
}
---------------------------------
@RequestMapping("/")
public String home(HttpServletRequest request, Principal principal) {
System.out.println(">>> Remote user: " + request.getRemoteUser());
System.out.println(">>> Principal: " + (principal != null ? principal.getName() : "null"));
return "index";
}
--------------------
@SpringBootApplication
public class DemoApplicationRunner {
public static void main(String[] args) {
SpringApplication.run(DemoApplicationRunner.class, args);
}
}
-----------------
//application.properties
logging.config=classpath:log4jServlet.xml
logging.level.org.springframework = info
logging.level.org.eclipse.jetty = info
spring.main.allow-circular-references=true
spring.main.allow-bean-definition-overriding=true
logging.level.org.springframework.security=DEBUG
logging.level.com.github.waffle=DEBUG
waffle.filter.enabled=true
waffle.sso.enabled=true
spring.mvc.view.prefix=/WEB-INF/jsp/
spring.mvc.view.suffix=.jsp
spring.mvc.static-path-pattern=/static/**
spring.resources.static-locations=classpath:/static/
spring.web.resources.static-locations=classpath:/static/,classpath:/META-INF/resources/,file:src/main/webapp/
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
-----------------------
//build.gradle
plugins {
id 'application' // hack used to apply all the stuff from main build.gradle to this project
id 'org.springframework.boot' version "${springBootVersion}"
id 'java'
}
configurations {
implementation.exclude module: "spring-boot-starter-tomcat"
implementation.exclude module: "spring-boot-starter-logging"
}
dependencies {
implementation 'org.apache.logging.log4j:log4j-slf4j2-impl:2.19.0'
implementation platform("org.springframework.boot:spring-boot-dependencies:${springBootVersion}"){
exclude group: "com.microsoft.sqlserver", module: "mssql-jdbc"
exclude group: 'org.apache.logging.log4j', module: 'log4j-to-slf4j'
}
implementation group: "javax.servlet", name: "javax.servlet-api", version: "4.0.1"
implementation group: "javax.servlet.jsp", name: "javax.servlet.jsp-api", version: "2.3.3"
implementation('org.springframework.boot:spring-boot-starter-web') {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
runtimeOnly 'org.springframework.boot:spring-boot-starter-tomcat'
// Optional: For JSPs support
implementation 'org.apache.tomcat.embed:tomcat-embed-jasper'
implementation 'javax.servlet:jstl'
// existing dependencies...
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.google.guava:guava:13.0.1'
implementation 'org.jfree:jfreechart:1.0.17'
implementation 'com.github.waffle:waffle-spring-boot-starter:3.0.0'
}
configurations.all {
exclude group: 'ch.qos.logback', module: 'logback-classic'
exclude group: 'ch.qos.logback', module: 'logback-core'
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
Подробнее здесь: https://stackoverflow.com/questions/796 ... e-spring-b