Java – test the Hessian remoting servlet xml

We use Hessian to communicate between rich clients and servers

It sometimes occurs as a result of moving and renaming The entry in the XML does not match the actual class name

So I'm looking for an easy way to test remote XML

Is there a simple way? It's best not to parse the XML manually and try to instantiate all the classes mentioned there

Solution

We will now create a spring beanfactory in the test:

private final beanfactory factory =
        new Xmlbeanfactory(new FileSystemResource("remoting-servlet.xml"));

And try to create each configured bean:

assertNotNull(factory.getBean("beanName"));

Work well

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>