I have found an issue which kept spring looping during its initialization wihout any error messge printed on console.
The version of mybatis-spring I used is 1.2.2 along with spring 4.1.0.RELEASE.
I guess all typo errors in mybatis mapper xml files including mybatis-config.xml may cause this problem.
The error logs can be displayed only by setting log level to debug in AbstractBeanFactory class, but this is really an undesirable action because the log would be deluged with unwanted debuging logs from startup phase or web requests.
I wonder if there is a better way to solve this problem, or it's just designed this way.
In the attachment, the breakpoint will be repeatedly hitted as long as the loop exists, but all the exceptions were suppressed.
My team members and me have encountered this issue many times. Considering this is the time consuming mistake that anyone could easily make, I really want to know how to fix it. many thx
Alright, I'm raising the log level to "warn" there.
That said, please note that this only happens for FactoryBean implementations that do not return a non-null type from their getObjectType() implementation, which is rare. In the case of the Mybatis MapperFactoryBean, the object type is getting determined through a customizable property which simply won't be set for early type checks. If the implementation would fall back to some base type, anything non-null, from getObjectType() when called early, you wouldn't run into this situation to begin with.