Spring4 XML file update reload Bean's wonderful problem __tomcat

Source: Internet
Author: User

The problem is this.
Development environment: Win7 + tomcat7 + jdk1.7 + spring4.5

I used XML to configure some of the parameter information to use when Bean,tomcat started, I modified the parameter information in the XML file and then reloaded the bean with the following method

Resource Resource = new Classpathresource (ymall.xml);
beanfactory bf = new Xmlbeanfactory (Resource);

Bf.getbean ("Codebean");


There is no problem in the development environment, when I modify the XML file, without restarting Tomcat, by calling the above method, I can get the modified bean parameter

But ~~~~~~~

It's a wonderful thing.

I packaged the tested program into a production environment: (centos6.5 Linux + tomcat7 + jdk1.7 + spring4.5), no matter how I modify the XML, overload the Bean,

Get the configuration parameters for Tomcat startup, not the configuration parameters that I want to change.

I would like to ask the great God, in the Linux environment, how can I modify to get the results I want ....

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.