Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to dump autowired spring beans to a xml configuration file?
    primarykey
    data
    text
    <p>I am using the @Autowired annotation with spring-mvc and spring-security, it works, but the webapp start very slow, about 1 munute every time, because the spring-mvc and spring-security scan twice all autowired classes and the total count of classes about 500. Are there any suggestions to speed up the scan time? or the static xml configuration is better?</p> <p>in web.xml</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt; /WEB-INF/rest-servlet.xml &lt;/param-value&gt; &lt;/context-param&gt; &lt;filter&gt; &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt; &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt; &lt;/filter&gt; &lt;filter-mapping&gt; &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/filter-mapping&gt; &lt;servlet&gt; &lt;servlet-name&gt;rest&lt;/servlet-name&gt; &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt; &lt;load-on-startup&gt;2&lt;/load-on-startup&gt; &lt;/servlet&gt; &lt;servlet-mapping&gt; &lt;servlet-name&gt;rest&lt;/servlet-name&gt; &lt;url-pattern&gt;/&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; .... </code></pre> <p>in rest-sevlet.xml</p> <pre><code> &lt;context:component-scan base-package="com.mycomp" /&gt; &lt;mvc:annotation-driven /&gt; &lt;mvc:interceptors&gt; .... &lt;/mvc:interceptors&gt; &lt;import resource="classes/config/applicationContext-security-base.xml"/&gt; &lt;import resource="classes/config/applicationContext-security.xml"/&gt; &lt;import resource="classes/config/spring-aop.xml"/&gt; &lt;!-- i18n --&gt; &lt;import resource="classes/config/spring-locale.xml"/&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload