目前使用SpringBoot2.0.1和SpringSecurity5.0.4进行反应应用程序。
问题是我根本没有任何Spring安全日志。
额外细节:
我是不是遗漏了什么?如何在反应性应用程序中启用Security 5日志(最好使用属性而不是代码)?
谢谢您抽时间见我。
更新1:在https://github.com/fbeaufume/webflux-security-sample中上传一个MWE
更新2:我的应用程序的Security配置基于http://www.baeldung.com/spring-security-5-reactive (可能不推荐使用SpringBoot2.0.0.M6),但还不能工作。
更新3:当使用来自https://github.com/spring-projects/spring-boot/tree/v2.0.1.RELEASE/spring-boot-samples/spring-boot-sample-secure-webflux的代码时,Security可以工作,但仍然没有日志
发布于 2020-08-06 16:27:14
现在可以从5.4.0-M2版本开始为webflux反应性应用程序进行春季安全日志记录(如@bzhu在注释How do I enable logging for Spring Security?中提到的那样)。
在进入GA发行版之前,下面是如何在gradle中获得这个里程碑版本
repositories {
mavenCentral()
if (!version.endsWith('RELEASE')) {
maven { url "https://repo.spring.io/milestone" }
}
}
// Force earlier milestone release to get securing logging preview
// https://docs.spring.io/spring-security/site/docs/current/reference/html5/#getting-gradle-boot
ext['spring-security.version']='5.4.0-M2'
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}https://stackoverflow.com/questions/49877221
复制相似问题