Spring式言語
メソッド内の属性や引数を定義する暗黙の参照として使用できます.
@Value("#{ systemProperties['user.region'] }") String defaultLocale;
SPELはスプリングBeanにアクセスできます.@Value("#{beanId.method}") BeanType param;
SPELは文字列としてプロパティにアクセスできます(キャスティングが必要です).@Value("${property1}") int property1;
@Value("#{environment['property2']}") int property2;
@Value("#{new Integer(environment['property3'])*2}") int property3;
未定義の使用spelでデフォルト値を代入します.@Value("${property1 : 1}") int property1;
@Value("#{environment['property2'] ?: 1}") int property2;
Reference
この問題について(Spring式言語), 我々は、より多くの情報をここで見つけました https://dev.to/eidher/spring-expression-language-spel-32faテキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol