Java 应用程序上下文在初始化后继续重新加载

Java 应用程序上下文在初始化后继续重新加载,java,spring,tomcat,Java,Spring,Tomcat,我在使用Struts2、spring和ApacheTomcat启动web应用程序中的StandardContext时遇到问题。服务器继续重新加载,并且不会自行停止。以下代码持续重复 set 21, 2015 2:26:40 PM org.apache.catalina.core.StandardContext reload INFO: Reloading Context with name [/My_Web_Service] has started set 21, 2015 2:26:40 PM

我在使用Struts2、spring和ApacheTomcat启动web应用程序中的StandardContext时遇到问题。服务器继续重新加载,并且不会自行停止。以下代码持续重复

set 21, 2015 2:26:40 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/My_Web_Service] has started
set 21, 2015 2:26:40 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
set 21, 2015 2:26:44 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
我必须加载一个属性文件,我使用了这个,但不起作用:

<bean id="placeHolderBean"
        class="org.jasypt.spring.properties.EncryptablePropertyPlaceholderConfigurer">
        <constructor-arg ref="configurationEncryptor" />
        <property name="ignoreUnresolvablePlaceholders" value="true" />
        <property name="locations">
            <list>
                <value>classpath:myFile.properties</value>
            </list>
        </property>
        <property name="order" value="1"/>
    </bean>

    <bean id="replacerBean" class="it.vptech.util.editor.PasswordPlaceholderReplacer">
        <constructor-arg ref="configurationEncryptor" />
        <property name="locations">
            <list>
                <value>classpath:myFile.properties</value>
            </list>
        </property>
        <property name="order" value="0"/>
    </bean>

如果确实需要写入文件,请将可重新加载设置为false

请在可重新加载部分阅读此内容> 如果希望Catalina监视/WEB-INF/classes/和/WEB-INF/lib中的类的更改,并在检测到更改时自动重新加载WEB应用程序,请设置为true


请恕我直言,从手机发送

在应用程序启动时是否执行一些文件操作?我想使用spring批注在应用程序上下文中加载属性文件。替换程序?不要写入文件,上下文不会被重新加载。你是对的。非常感谢。