/ / Such as the title , the default function of specific roles and relationships reflecting God Ma Ha ? Neighborhoods ~
public class UserService implements IUserService {
/ **
* defined IUserDAO types of properties , in order to achieve implementation class UserService and IUserDAO writing between
* /
private IUserDAO userDAO;
/ **
* default constructor , using Spring and Hibernate environment generally require ( reflective )
* /
public UserService () {
}
/ **
* constructor with parameters in the constructor injection using the Spring when the need ( reflection )
* /
public UserService (IUserDAO userDAO)
{
this.userDAO = userDAO;
}
/ **
* Set userDAO properties using Spring Setter Injection in need
* /
public void setUserDao (IUserDAO userDAO) {
this.userDAO = userDAO;
}
/ / other code
}
------ Solution ----------------------------------- ---------
Keke, moderator, just leave a message in your space a ~
order according to your study , recommend several SSH learning , the development of books chant , seeking to force the outbreak ! !
proficient struts
proficient hibernate
proficient in spring
Sunweiqin
------ Solution ---------------------------------- ----------
initialization call , did not have to display the configuration
------ For reference only ------------------ ---------------------
my roof ! I top ! I top !
------ For reference only -------------------------------------- -
nothing. On an ordinary constructor , but it is provided to the framework into this object requires a default constructor
------ For reference only ----------------- ----------------------
Keke, moderator, just leave a message in your space a ~
order according to your study , recommend several SSH learning , the development of books chant , seeking to force the outbreak ! !
------ For reference only -------------------------------------- -
Keke, moderator, just leave a message in your space a ~
order according to your study , recommend several SSH learning , the development of books chant , seeking to force the outbreak ! !
proficient struts
proficient hibernate
proficient in spring
Sunweiqin
Haha, simple enough
没有评论:
发表评论