![]() |
1
23
无法使用自动关联集合
the Spring documentation 更多细节。 |
![]() |
2
5
public class Foo { @Autowired public Foo(@Value("#{bar}") Set<String> bar) { // ... } } |
![]() |
3
2
我
认为
我认为你不能用自动布线来做这个。除了在XML中手动连接外,我能建议的最好方法是:
|
![]() |
4
2
我也有同样的问题,我的灵感来自
@rembisz's answer
SpEL documentation on bean references
,我发现了一种不同的SpEL语法来用autowired值来表示bean引用,这对我很有用-
|