基于SSM框架的管理系统:登录功能
基于SSM框架的管理系统:登录功能 在基于SSM框架的管理系统:简单实现数据库查询的基础上,完成登录功能。 数据库简单查询功能实现: https://blog.csdn.net/JerryTommiy/article/details/95617809 具体步骤: 1、在 dao 层里添加登录方法。 public UserInfo login(UserInfo userInfo); 2、在 resources.mapper 包里添加 <select id="login" resultType="com.zhongruan.bean.UserInfo" parameterType="com.zhongruan.bean.UserInfo"> select * from userinfo where username=#{username} and password=#{password} </select> 3、在 service 层里 IUserInfoService 接口添加登录方法 login ,并在 UserInfoServiceImpl 类里实现登录方法。 //service.IUserInfoService public boolean login(UserInfo userInfo); //service.impl.UserInfoServiceImpl public