spring project started slow problem

problem:

This question when I learned there have been spring frame, then start slowly been stuck in the console project. But it can patiently wait out. When I learned of springMVC it is so, but tomcat start printing log jammed again as shown
Here Insert Picture Description
patience I search the Internet a lot, but does not match all issues. I also tried the following is stuck in that part of himself.
Because when I learned of spring met, so I subconsciously think the problem is spring frame configuration files, so in this springMVC entry procedures I will servlet section of the configuration file scanning springMVC commented try to start again, sure enough speed brush start-up.
Here Insert Picture Description
So the question appears in the spring configuration file.

solve:

We will be bound by springmvc configuration file can be replaced by the following:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                        http://www.springframework.org/schema/beans/spring-beans.xsd
                        http://www.springframework.org/schema/context
                        http://www.springframework.org/schema/context/spring-context.xsd
                        http://www.springframework.org/schema/mvc
                        http://www.springframework.org/schema/mvc/spring-mvc.xsd">

I used to like this, in fact, the difference is the order of spring-context and spring-mvc introduction is not the same, which may lead to less than the corresponding xsd looking for projects resulting in stuck:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
        http://www.springframework.org/schema/beans
        https://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context.xsd">

Learning self-:
https://my.oschina.net/ouyangtaohong/blog/810037

There's bound plus the springMVC version, I tried not, it will remove the version number is also a success.

to sum up:

Like big brother said, when spring starts, will be configured from a spring configuration file download xsd address information, if you do not release information on the configuration, it is loaded from your local. If you write a version of the spring and the introduction of information of the same version, will be loaded from a local, and if you do not match the introduction, from the external network to download.

This is bound to write the question does not lead to a slow start, of course, may also be other reasons, this is just my situation.

Please indicate if an error Thank you!

Published 57 original articles · won praise 11 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_42419462/article/details/104180710