无法在密码栏为空的时候输出“请输入密码”
你调试下看看这个 test2.getPassword() 得到的是Null还是空
你可以使用org.apache.commons.lang3.StringUtils的StringUtils.isEmpty()判空