I try to write custom class for permissions evaluation, so it can be used with Spring Security @PreAuthorize
and Spring Expression Language like for example this (<
What version of Spring are you using? I just ran this test case with 4.3.12 and it worked fine...
@SpringBootApplication
public class So46953884Application {
public static void main(String[] args) {
SpringApplication.run(So46953884Application.class, args);
}
@Value("#{foo.foo('a', 'b')}")
private String foo;
@Bean
public ApplicationRunner runner() {
return args -> System.out.println(foo);
}
@Bean
public Foo foo() {
return new Foo();
}
public static class Foo {
public String foo(String... strings) {
return "filled: " + Arrays.toString(strings);
}
}
}
Result:
filled: [a, b]