对于最新的稳定版本,请使用 Spring Security 6.3.1! |
对于最新的稳定版本,请使用 Spring Security 6.3.1! |
以下步骤与如何完成迁移授权支持有关。
用于消息安全AuthorizationManager
在 6.0 中,默认为 .
因此,要完成迁移,请删除任何属性。<websocket-message-broker>
use-authorization-manager
true
websocket-message-broker@use-authorization-manager=true
例如:
-
Xml
<websocket-message-broker use-authorization-manager="true"/>
更改为:
-
Xml
<websocket-message-broker/>
对于此功能,Java 或 Kotlin 没有进一步的迁移步骤。
用于请求安全性AuthorizationManager
在 6.0 中,默认为 、 和 。
此外,authorizeRequests#filterSecurityInterceptorOncePerRequest
默认为 ,authorizeHttpRequests#filterAllDispatcherTypes
默认为 。
因此,要完成迁移,可以删除任何默认值。<http>
once-per-request
false
filter-all-dispatcher-types
true
use-authorization-manager
true
false
true
例如,如果您选择使用 6.0 默认值或类似设置:filter-all-dispatcher-types
authorizeHttpRequests#filterAllDispatcherTypes
-
Java
-
Kotlin
-
Xml
http
.authorizeHttpRequests((authorize) -> authorize
.filterAllDispatcherTypes(true)
// ...
)
http {
authorizeHttpRequests {
filterAllDispatcherTypes = true
// ...
}
}
<http use-authorization-manager="true" filter-all-dispatcher-types="true"/>
然后可以删除默认值:
-
Java
-
Kotlin
-
Xml
http
.authorizeHttpRequests((authorize) -> authorize
// ...
)
http {
authorizeHttpRequests {
// ...
}
}
<http/>
|
|