com.alibaba.druid.pool.DruidDataSource.info {dataSource-1} inited

发布于:2021-12-02 21:04:22



[http-nio-80-exec-3] com.alibaba.druid.pool.DruidDataSource.info {dataSource-1} inited


java小白一枚,在做登录案例时候,登录表单提交到servlet后出现如下错误:
[http-nio-80-exec-3] com.alibaba.druid.pool.DruidDataSource.info {dataSource-1} inited
求各位大佬看看那里出了问题。
该servlet代码如下:



`
//1,设置编码
request.setCharacterEncoding("utf-8");
//2,获取请求参数
String username = request.getParameter("username");
String password = request.getParameter("password");
//3,封装User对象
User loginUser = new User();
loginUser.setUsername(username);
loginUser.setPassword(password);
//4,调用UserDao的login方法
UserDao dao = new UserDao();
User user = dao.login(loginUser);
//5,判断user
if(user == null){
//登录失败
request.getRequestDispatcher("/failServlet").forward(request,response);
}else{
//登录成功
//存储数据
request.setAttribute("user",user);
//转发
request.getRequestDispatcher("/successServlet").forward(request,response);
}

看别人说的把duid.properties修改:


url=jdbc:mysql://127.0.0.1:3306/day05?useUnicode=true&characterEncoding=UTF-8

还是出现如上错误。

相关推荐

最新更新

猜你喜欢