0
私のコントローラで、私は春のアノテーションでsystem properties
を取得しようとしています。これは、コードSpring Expression Language - アノテーションでシステムプロパティを取得
org.springframework.expression.spel.SpelParseException
を投げている
@PreAuthorize("hasPermission('${systemProperties['user.name']}', '')")
あります。 は私が
春の注釈内のシステムプロパティを取得するための構文は何ですか同じexception
に
@PreAuthorize("hasPermission('#{systemProperties['user.name']}', '')")
が、結果を試してみましたか?
あなたは#{systemProperties'代わりに '$ {systemProperties'の'使うべきではないでしょうか。 –
試しましたが、同じ例外が発生しました –
@Suganthanは与えられた例を試してみてください。ローカルでは機能していましたが、それ以外の場合は、それが間違っていると答えを削除します。 – dambros