Joined: Thu Mar 15, 2012 6:36 am Posts: 1
|
Hello Everyone, I recently started studying springs framework. So as a neophyte my questions will look silly. It would be great if you can help me with this.
I am trying to pass a int value from the spring configuration file for example :-
<property name="X" value="0.57"/>And my bean class has setters and getters for this property :-
private int X; public int getX() { return X; }
public void setX(int x) { X = x; }
When I convert it to string or pass the int value via constructor injection everything works fine but not when I use the method injection to pass the int value.
I read that spring framework does the automatic type conversion. Then why it fails here
|
|