开发者

WAS 6.1 JDK & Spring Autowiring

开发者 https://www.devze.com 2023-03-17 18:58 出处:网络
By default, autowiring happens by propertyname.It seems if I compile my application with the WAS 6.1 JDK, spring cannot autowire my dependencies by name and then instead reverts to type which is causi

By default, autowiring happens by propertyname. It seems if I compile my application with the WAS 6.1 JDK, spring cannot autowire my dependencies by name and then instead reverts to type which is causing an issue because of some ambiguous Validator references in my controllers. The controller properties are all of type Validator and there are 9 validators defined in the context file so spring complains that it finds too many matches. I know one way around this would be to use the actual implementation class as the type for the validator instances in my controller cla开发者_如何学JAVAsses, but I want to know if anyone else has encountered this problem with autowiring by name failing when compiled with the WAS 6.1 jdk.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号