Error no setter found for property 'majordao 'in class 'com. jygzxt in applicationcontext

Source: Internet
Author: User

Error: No setter found for property 'majordao 'in class 'com. jygzxt. Service. Major. majorserviceimpl'

Majorserviceimpl. Ava

Package com. jygzxt. Service. Major;

Import java. util. List;

Import com. jygztx. Dao. Major. majordao;
Import com. jygzxt. Po. Major. Major;

Public class majorserviceimpl implements majorservice {

Private majordao imajordao;
Public void setmajordao (majordao imajordao)
{
This. imajordao = imajordao;
}


// Delete a major
Public Boolean Delete (string majorno ){
If (imajordao. querybyid (majorno) = NULL)
{
Return false;
}
Else
{
Imajordao. Delete (majorno );
Return true;

}

}


// Query all majors
Public list queryall ()
{
Return imajordao. queryall ();
}


// Search for a major by professional ID
Public major querybyid (string majorno)
{

Return imajordao. querybyid (majorno );
}


// Add
Public Boolean save (Major ){
If (imajordao. querybyid (Major. getmajorno () = NULL)
{
Imajordao. Save (Major );
Return true;
}
Else
{
Return false;

}

}

// Update
Public Boolean Update (Major ){
If (imajordao. querybyid (Major. getmajorno () = NULL)
{
Return false;
}
Else
{
Imajordao. Update (Major );
Return true;
}
}

}

Error in applicationcontext ;:

<! -- Configure the business logic component -->
<Bean id = "majorservice" class = "com. jygzxt. Service. Major. majorserviceimpl">
<Property name = "majordao" ref = "majordao"> </property>
</Bean>

 

Cause: Public void setmajordao (majordao imajordao)

Set + ***** Dao

The first letter after the set must be in uppercase, And the DaO name must be specified.

The cause is:

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.