SpringComponentProvider is dependent on ServletContext which doesn't exist in non-servlet container case. So it will cause ClassNotFoundException in non-servlet container case where ServletContext.class can not be found.
The related code in SpringComponentProvider.initialize
SpringComponentProvider is dependent on ServletContext which doesn't exist in non-servlet container case. So it will cause ClassNotFoundException in non-servlet container case where ServletContext.class can not be found.
The related code in SpringComponentProvider.initialize