出现500错误
http://localhost:8080/admin/Catalog/list.do
org.apache.ibatis.io.Resources; org.apache.ibatis.session.SqlSessionFactory; org.apache.ibatis.session.SqlSessionFactoryBuilder; java.io.IOException; DaoFactory { DaoFactory ; SqlSessionFactory ; DaoFactory(){ SqlSessionFactoryBuilder sqlSessionFactoryBuilder = SqlSessionFactoryBuilder(); { = sqlSessionFactoryBuilder.build(Resources.()); }(IOException e){ e.printStackTrace(); } } DaoFactory getInstance() IOException { (== ){ = DaoFactory(); } ; } <> getDao(Class<> tClass) { .openSession().getMapper(tClass); } }
javax.servlet.*; javax.servlet.http.HttpServletRequest; javax.servlet.http.HttpServletResponse; java.io.IOException; EncodingFilter Filter { String =; init(FilterConfig filterConfig) ServletException { (filterConfig.getInitParameter()!=){ =filterConfig.getInitParameter(); } } doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) IOException, ServletException { HttpServletRequest request = (HttpServletRequest) servletRequest; HttpServletResponse response = (HttpServletResponse) servletResponse; request.setCharacterEncoding(); response.setCharacterEncoding(); filterChain.doFilter(request,response); } destroy() { } }
8
收起
正在回答 回答被采纳积分+1
1回答
3. Java 数据库开发与实战应用
- 参与学习 人
- 提交作业 357 份
- 解答问题 8016 个
本阶段将带你学习MySQL数据库,JDBC接口,MyBatis框架等,带你掌握的数据的存放和管理。
了解课程
恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星