Hessian cannot inject DAO's problem solving

Source: Internet
Author: User

Every day card, write a program is very laborious, not card here is card there, days of not caller, week 6th fee time is on this above.

Problem: Hessian can be transferred, is unable to manipulate the database, Userdao can not inject, is null, at the beginning of the period thought is the entity class assignment problem, engaged in a half-day is not;

How to solve it? The problem is on Web. xml:

<!--spring configuration file Start--><context-param><param-name>contextconfiglocation</param-name>< Param-value>classpath:spring-*.xml  </param-value></context-param>

The above is the correct configuration:

This is wrong:

<!--spring configuration file Start--><context-param><param-name>contextconfiglocation</param-name>< param-value>classpath:spring-config.xml</param-value></context-param><!-- Configure the location of the spring-hessian.xml you just wrote here-        <context-param>            <param-name>contextConfigLocation< /param-name>            <param-value>                  classpath:spring-hessian.xml            </param-value>        </ Context-param>   

Cannot have two such <context-param> configuration at the same time, but the program does not error.

Hessian cannot inject DAO's problem solving

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.