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: