Spring Constructor Argument Ambiguity with Simple Types
问题 I'm following Spring Reference Documentation 4.0.0.RELEASE. It says When a simple type is used, Spring cannot determine the type of the value, and so cannot match by type without help The scenario is as follows package examples; public class ExampleBean { private int years; private String ultimateAnswer; public ExampleBean(int years, String ultimateAnswer) { this.years = years; this.ultimateAnswer = ultimateAnswer; } } Now to resolve the arguments, it is instructed to use type attribute in