You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you might have noticed, I have omitted declaring the getInstance method as static.
In that case, the error message is as follows:
Error creating bean with name 'clientServiceSingleton' defined in class path resource [factory/method/factorymethod-config.xml]:
No matching factory method found: factory method 'getInstance'
Also, STS is not showing an explicit message either.
I believe the error message could show something such as:
No matching factory method found: factory method 'getInstance'. Check that the method exists and that it is static.
note: in case the return type is incorrect, it crashes far after, when injecting the dependency. So at this stage, the error message should not mention that the return type might be wrong.
Michael Isvy opened SPR-6837 and commented
I'm using the following configuration:
As you might have noticed, I have omitted declaring the getInstance method as static.
In that case, the error message is as follows:
Also, STS is not showing an explicit message either.
I believe the error message could show something such as:
note: in case the return type is incorrect, it crashes far after, when injecting the dependency. So at this stage, the error message should not mention that the return type might be wrong.
Referenced from: commits 18bd4a8
The text was updated successfully, but these errors were encountered: