There is no getter for property named 'sysUser' 是哪里有问题吗

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'sysUser' in 'class com.dg39.generalize.entity.SysUser'图片说明图片说明图片说明

1个回答

mybatis有两种调用方法xml,要想使用@Param注解,则只能用接口方式调用,我猜你们用的是sqlSession方式调用的,所以导致注解无效。
解决办法,xml中的#{sysUser.email}等去掉sysUser。

qq_33741933
OPtimist_CD 去掉sysUser不报错了
11 个月之前 回复
qq_33741933
OPtimist_CD 可以了,谢谢
11 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
there is no ** getter for property

这是我的controller: @RequestMapping("/editFabricSubmit") public String editFabricSubmit(HttpServletRequest request, Fabric fabric, MultipartFile fabric_pic) throws Exception{ String originalFilename = fabric_pic.getOriginalFilename(); if(fabric_pic!=null && originalFilename!=null && originalFilename.length()>0){ String pic_path = "D:\\pic\\"; String newFileName = UUID.randomUUID() + originalFilename.substring(originalFilename.lastIndexOf(".")); File newFile = new File(pic_path+newFileName); fabric_pic.transferTo(newFile); fabric.setPic(newFileName); } fabricService.updateByPrimaryKeySelective(fabric); return "success"; 这是我的po: private Integer id; private String name; private String compositions; private Double baseprice; private String yarncount; private String density; private String weight; private String width; private String pic; private String supplierno; private Double restmeter; 这是我的mapper. <update id="updateByPrimaryKeySelective" parameterType="textile.ssm.po.Fabric" > update fabric set name = #{name,jdbcType=VARCHAR}, compositions = #{compositions,jdbcType=VARCHAR}, baseprice = #{baseprice,jdbcType=DOUBLE}, yarncount = #{yarncount,jdbcType=VARCHAR}, density = #{density,jdbcType=VARCHAR}, weight = #{weight,jdbcType=VARCHAR}, width = #{width,jdbcType=VARCHAR}, pic = #{pic,jdbcType=VARCHAR} id = #{id,jdbcType=INTEGER}, restmeter = #{restmeter,jdbcType=DOUBLE}, where supplierno = #{supplierno,jdbcType=INTEGER} </update> 为什么一直显示 there is no ** getter for property named 'technics' in 'class textile.ssm.po.Fabric'

Mybaits调用存储过程报错There is no setter for property named 'result' in 'class java.lang.Class'

存储过程: CREATE PROCEDURE my_test (OUT result VARCHAR(10)) BEGIN SELECT DATE_FORMAT(NOW(),'%Y%m%d') INTO result; -- SELECT result; END Mybatis调用 <select id="getPredureValue" resultType="string" statementType="CALLABLE"> CALL my_test (#{result,mode=OUT,jdbcType=VARCHAR}) </select> 报错: 严重: Servlet.service() for servlet [spring] in context with path [/MyBatis_06_ssm] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: Could not set property 'result' of 'class java.lang.Class' with value '_20190316_' Cause: org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'result' in 'class java.lang.Class'] with root cause org.apache.ibatis.reflection.ReflectionException: There is no setter for property named 'result' in 'class java.lang.Class' at org.apache.ibatis.reflection.Reflector.getSetInvoker(Reflector.java:401) at org.apache.ibatis.reflection.MetaClass.getSetInvoker(MetaClass.java:168) at org.apache.ibatis.reflection.wrapper.BeanWrapper.setBeanProperty(BeanWrapper.java:177) at org.apache.ibatis.reflection.wrapper.BeanWrapper.set(BeanWrapper.java:59) 如上mybatis调用存储过程报错,实际上是查询出了结果:20190316,就是在返回结果的时候报错了,不知道是存储过程的问题还是mybatis调用问题, 返回结果这里程序使用的是BeanWrapper,如果使用MapWrapper应该就没有问题,但不明白哪里出问题了,请大佬们帮忙啊!

mybatis造反了,各位道友速来助阵。

报错:There is no getter for property named 'USERNAME' in 'class com.sinosoft.cisfrm.bugMessage.entity.Bug' sql:<mapper namespace="com.sinosoft.cisfrm.bugMessage.mapper.BugMapper"> <resultMap id="baseResult" type="com.sinosoft.cisfrm.bugMessage.entity.Bug"> <id property="bugId" column="bugId" javaType="INTEGER"/> <result property="username" column="username"/> <result property="title" column="title"/> <result property="bug" column="bug"/> <result property="date" column="date" javaType="DATE"/> </resultMap> <sql id="baseColumns"> bugId, username, title, bug, date </sql> <select id="findAll" resultMap="baseResult" parameterType="String"> SELECT <include refid="baseColumns"/> FROM BUG </select> <insert id="addBug" > INSERT INTO BUG (USERNAME,TITLE,BUG,DATE) VALUES(#{USERNAME},#{TITLE},#{BUG},#{DATE,javaType=DATE}) </insert> </mapper>

Ibatis中的一个“There is no READABLE property named 'uId' in class 'userinfoPo”错误

我在ibatis中有如下配置: 这是一个PO: /** * 用户基本信息 * @author Rao * @Date 2009-10-04 * @Table (mwweb.userinfo) */ public class UserinfoPo { private String uId; //用户Id private String uName; //用户登录名称 private String uNickname; //用户昵称 private String uPass; //用户密码 private String uEmail; //用户Email private String uBirth; //用户出生日期 private int uSex; //用户性别(1男,2女) private String uAddress; //用户地址 public String getUName() { return uName; } public void setUName(String name) { uName = name; } public String getUPass() { return uPass; } public void setUPass(String pass) { uPass = pass; } public String getUEmail() { return uEmail; } public void setUEmail(String email) { uEmail = email; } public String getUBirth() { return uBirth; } public void setUBirth(String birth) { uBirth = birth; } public int getUSex() { return uSex; } public void setUSex(int sex) { uSex = sex; } public String getUAddress() { return uAddress; } public void setUAddress(String address) { uAddress = address; } public String getUNickname() { return uNickname; } public void setUNickname(String nickname) { uNickname = nickname; } public String getUId() { return uId; } public void setUId(String id) { uId = id; } } 这是sqlMap中的userinfo.xml配置文件: <!-- 新增用户 --> <insert id="insertUserinfo" parameterClass="MWWeb.bbs.po.UserinfoPo"> <![CDATA[ INSERT INTO userinfo( uId, uName, uNickname, uPass, uEmail, uBirth, uSex, uAddress ) values ( #uId:VARCHAR#, #uName:VARCHAR#, #uNickname:VARCHAR#, #uPass:VARCHAR#, #uEmail:VARCHAR#, #uBirth:VARCHAR#, #uSex:INT#, #uAddress:VARCHAR#, ) ]]> </insert> 我部署好了启动tomcat时出现了这样的错误: There is no READABLE property named 'uId' in class 'MWWeb.bbs.po.UserinfoPo' 这是什么问题呢,我找了好久都没有解决。 希望各位达人能够给与指教,在下实在是感激不尽 [b]问题补充:[/b] 我又重新部署了,不是没有编译,部署了旧的.class文件

SSM中使用 pageHelper遇到的问题 希望大神来解决一下

![图片说明](https://img-ask.csdn.net/upload/201801/21/1516499689_279115.png) 注意:当不使用PageHelper插件查询时 查询是成功的 说明Mapper和pojo应该是没有问题的 报错信息如下 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '__frch_criterion_1' in 'class com.taotao.pojo.TbContentExample' at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371) at com.sun.proxy.$Proxy10.selectList(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198) at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52) at com.sun.proxy.$Proxy15.selectByExampleWithBLOBs(Unknown Source) at com.taotao.pagehelper.TestPageHelper.testContent(TestPageHelper.java:105) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '__frch_criterion_1' in 'class com.taotao.pojo.TbContentExample' at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:380) at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:170) at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:152) at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:48) at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:116) at org.apache.ibatis.reflection.MetaObject.metaObjectForProperty(MetaObject.java:138) at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:109) at com.github.pagehelper.SqlUtil$SimpleParser.setPageParameter(SqlUtil.java:256) at com.github.pagehelper.SqlUtil$MysqlParser.setPageParameter(SqlUtil.java:278) at com.github.pagehelper.SqlUtil.setPageParameter(SqlUtil.java:132) at com.github.pagehelper.SqlUtil.processPageMappedStatement(SqlUtil.java:157) at com.github.pagehelper.PageHelper.intercept(PageHelper.java:154) at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:60) at com.sun.proxy.$Proxy29.query(Unknown Source) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:108) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358) ... 30 more

mybatis 加了@param注解 还是遇到there is no getter异常

mybatis 加了@param注解 还是遇到there is no getter异常 看了网上说的大都是因为没有加@param注解,但是我加了还是报这个错误

teachers实体类中没有名为“teachers”的属性的getter

查询方法报错 @ResponseBody @RequestMapping("/selectTeacher") public Object selectTeacher(Integer page, Integer limit, @RequestParam(required = false) String tName, @RequestParam(required = false) String tcardNo){ List<Teachers> list=teachersService.getStuByname((page-1)*limit,limit,tName,tcardNo); int count=teachersService.getcount(tName,tcardNo); Map<String, Object> result = new HashMap<String, Object>(); result.put("code", 0); result.put("data", list); result.put("count", count); System.out.println(list); return result; } 报错信息 There is no getter for property named 'teachers' in 'class com.ysd.managementsystem.entity.Teachers'

关于Ibatis中的resultMap元素的问题

最近刚学Ibatis,其中有个问题没搞明白,举个例子 <resultMap id="User" class="com.user.vo.UserVO" > <result property="UserID" column="ID" /> <result...../> <result...../> <resultMap/> 其中result元素里的property是对应vo中的属性,但是column是对应什么的呢? 我通过观察,觉得column对应的应该是数据库中相应属性的表头(自己猜测的),不知道正确与否,呵呵,望大家指教了。

这个错误是什么意思?求指点

Servlet.service() for servlet [spring-dispatcher] in context with path [/JFWorkingHourSystem] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause java.lang.NullPointerException![图片说明](https://img-ask.csdn.net/upload/201612/22/1482386758_572617.png)

js操作excel文件和Java操作excel文件

目前一个项目需要使用到用户信息导入功能,使用的是excel表单,有没有有这方面demo的大神,最好是适配谷歌、IE、火狐三大浏览器。谢谢。itxuxiang@sina.com

No getter method for property Owner of bean rsArra

[code="java"]<%@ page language="java" contentType="text/html;charset=gb2312" %> <jsp:directive.page import="com.xsminfo.struts.forms.*" /> <%@ page import="java.util.List" %> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"%> <%@ taglib uri="http://jakarta.apache.org/struts/tags-logic" prefix="logic"%> <%@ page import="java.util.LinkedList;" %> <% String path = request.getContextPath(); String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/"; List list=(List)request.getAttribute("rsArray"); out.println(list); %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html:html locale="true"> <head> <title>selectInfo.jsp</title> </head> <body> <th><a href="<%=basePath %>/selectInfo.jsp"><b>查询</b></a></th> <th><a href="" >修改</a></th> <th><a href="<%=basePath %>/infoPc.jsp">添加</a></th> <th><a href="">删除</a></th></br> <table border="1" > <html:form action="/selectInfo" > <tr> <td width="50%">部门 : <html:text property="departname"/><td/> <td width="50%">使用人 : <html:text property="owner"/><td/> <td width="50%">品牌: <html:text property="brand" /><td/><br/> </tr> <tr> <td width="50%">购机时间 : <html:text property="buytime"/><td/> <td width="50%">计算机名 : <html:text property="pcname"/><td/> <td width="50%">使用人 : <html:text property="username"/><td/> </tr> <tr> <html:submit value="提交"/><html:cancel value="取消"/> </tr> </html:form> </table> <table border="1"> <tr> <td>使用人 :</td> <td>内存 : </td> <td>电话 : </td> <td>特殊软件 : </td> <td>机器型号 : </td> <td>硬盘 : </td> <td>购机时间 : </td> <td>计算机名 : </td> <td>cpu : <td> <td>备注 : <td> <td>病毒名称 : <td> <td>部门 : <td> <td>品牌 : <td> <td>使用情况 :<td> <td>用户名 : <td> <td>是否液晶 : <td> <td>光驱 : <td> <td>职务 : <td> </tr> <logic:present name="rsArray" scope="request" > <logic:iterate id="rsArray" name="rsArray" > <tr> <td><bean:write name="rsArray" property="owner"/></td> <td><bean:write name="rsArray" property="memory"/></td> <td><bean:write name="rsArray" property="tele"/></td> <td><bean:write name="rsArray" property="specsoft"/></td> <td><bean:write name="rsArray" property="type"/></td> <td><bean:write name="rsArray" property="disksum"/></td> <td><bean:write name="rsArray" property="buytime"/></td> <td><bean:write name="rsArray" property="pcname"/></td> <td><bean:write name="rsArray" property="cpu"/></td> <td><bean:write name="rsArray" property="remark"/></td> <td><bean:write name="rsArray" property="virus"/></td> <td><bean:write name="rsArray" property="departname"/></td> <td><bean:write name="rsArray" property="brand"/></td> <td><bean:write name="rsArray" property="usething"/></td> <td><bean:write name="rsArray" property="username"/></td> <td><bean:write name="rsArray" property="iscrystal"/></td> <td><bean:write name="rsArray" property="ram"/></td> <td><bean:write name="rsArray" property="post"/></td> </tr> </logic:iterate> </logic:present> </table> </body> </html:html> [/code] action [code="java"]public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) { SelectInfoForm selectInfoForm = (SelectInfoForm) form;// TODO // Auto-generated // method stub String brand = (String)selectInfoForm.getBrand(); String buyTime = (String)selectInfoForm.getBuytime(); String departname = (String)selectInfoForm.getDepartname(); String owner = (String)selectInfoForm.getOwner(); String Pcname = (String)selectInfoForm.getPcname(); String username = (String)selectInfoForm.getUsername(); System.out.println(brand +"_____________"+buyTime+ "__________"+ departname+"________" +owner +"_____"+Pcname+"______________"+username); StringBuffer clause = new StringBuffer("select * from infopc where 1=1 "); if(!brand.equals("")){ clause.append("and brand='"+brand+"'"); } if(!buyTime.equals("")){ clause.append("and buytime='"+buyTime+"'"); } if(!departname.equals("")){ clause.append("and departname='"+departname+"'"); } if(!owner.equals("")){ clause.append("and owner='"+owner+"'"); } if(!Pcname.equals("")){ clause.append("and pcname='"+Pcname+"'"); } if(!username.equals("")){ clause.append("and username='"+username+"'"); } System.out.println("_______sql____________:" + clause); DB db = null; try { db = new DB(); db.connDb(); ResultSet rs = db.executeQuery(clause.toString()); List list= new ArrayList(); while(rs.next()) { //System.out.println("____ResultSet have value!___________"); //Integer.parseInt(arg0) list.add(rs.getInt(1)); list.add(rs.getString(2)); list.add(rs.getString(3)); list.add(rs.getString(4)); list.add(rs.getString(5)); list.add(rs.getString(6)); list.add(rs.getString(7)); list.add(rs.getString(8)); list.add(rs.getString(9)); list.add(rs.getString(10)); list.add(rs.getString(11)); list.add(rs.getString(12)); list.add(rs.getString(13)); list.add(rs.getString(14)); list.add(rs.getString(15)); list.add(rs.getString(16)); list.add(rs.getString(17)); list.add(rs.getString(18)); list.add(rs.getString(19)); System.out.println("rs.getInt(1):"+rs.getInt(1)); System.out.println("list.size() :"+list.size()); System.out.println(rs.getInt(1)+rs.getString(2)); } request.setAttribute("rsArray", list); System.out.println("session_______setAttribute得值是:"+list); System.out.println("____can run here!!!____________"); return mapping.findForward("success"); } catch (Exception e) { } finally { if (db != null) db.closeDb(); } return null; }[/code] 解决了一个下午 有点迷糊了 [b]问题补充:[/b] 写了个类 com.xxx.struts.util.Pcinfo 得到新异常。。 javax.servlet.ServletException: Cannot find bean Pcinfo in any scope while(rs.next()) { //System.out.println("____ResultSet have value!___________"); //Integer.parseInt(arg0) list.add(rs.getInt(1)); list.add(rs.getString(2));//depart list.add(rs.getString(3));//owner list.add(rs.getString(4));//pcname list.add(rs.getString(5));//username list.add(rs.getString(6));//post list.add(rs.getString(7));//brand list.add(rs.getString(8));//type list.add(rs.getString(9));//cpu list.add(rs.getString(10));//mem list.add(rs.getString(11));//disksum list.add(rs.getString(12));//ram list.add(rs.getString(13));//iscrty list.add(rs.getString(14));//buytime list.add(rs.getString(15));//tele list.add(rs.getString(16));//spec list.add(rs.getString(17));//usething list.add(rs.getString(18));//virus list.add(rs.getString(19));//remark Pcinfo ipform= new Pcinfo(); ipform.setBrand(rs.getString(7)); ipform.setBuytime(rs.getString(14)); ipform.setCpu(rs.getString(9)); ipform.setDepartname(rs.getString(2)); ipform.setDisksum(rs.getString(11)); ipform.setIscrystal(rs.getString(13)); ipform.setMemory(rs.getString(10)); ipform.setOwner(rs.getString(3)); ipform.setPcname(rs.getString(4)); ipform.setPost(rs.getString(6)); ipform.setRam(rs.getString(12)); ipform.setRemark(rs.getString(19)); ipform.setSpecsoft(rs.getString(16)); ipform.setTele(rs.getString(15)); ipform.setType(rs.getString(8)); ipform.setUsername(rs.getString(5)); ipform.setUsething(rs.getString(17)); ipform.setVirus(rs.getString(18)); list.add(ipform); 界面 如下: <logic:present name="rsArray" scope="request" > <logic:iterate id="rsArray" name="Pcinfo" type="com.xsminfo.struts.util.Pcinfo" > <tr> <td><bean:write name="rsArray" property="owner"/></td> <td><bean:write name="rsArray" property="memory"/></td> <td><bean:write name="rsArray" property="tele"/></td> <td><bean:write name="rsArray" property="specsoft"/></td> <td><bean:write name="rsArray" property="type"/></td> <td><bean:write name="rsArray" property="disksum"/></td> <td><bean:write name="rsArray" property="buytime"/></td> <td><bean:write name="rsArray" property="pcname"/></td> <td><bean:write name="rsArray" property="cpu"/></td> <td><bean:write name="rsArray" property="remark"/></td> <td><bean:write name="rsArray" property="virus"/></td> <td><bean:write name="rsArray" property="departname"/></td> <td><bean:write name="rsArray" property="brand"/></td> <td><bean:write name="rsArray" property="usething"/></td> <td><bean:write name="rsArray" property="username"/></td> <td><bean:write name="rsArray" property="iscrystal"/></td> <td><bean:write name="rsArray" property="ram"/></td> <td><bean:write name="rsArray" property="post"/></td> </tr> </logic:iterate> </logic:present>. 写法不对?

Servlet Request 如何通过mybatis进行搜索

各位大佬,本人自学小白求教 现在已得到 ``` String[] interest = req.getParameterValues("interest"); for (int i = 0; i < interest.length; i++) { System.out.println(interest[i]); } String date1 = req.getParameter("date1"); String date2 = req.getParameter("date2"); ``` 两个请求,然后怎么通过得到的请求传送给mapper.xml 进行sql搜索 sql语句是 ``` SELECT ch.pin, ch.checktime, us.badgenumber, us.name, us.defaultdeptid FROM checkinout ch LEFT JOIN userinfo us on ch.pin=us.badgenumber WHERE ch.checktime between '2019/04/01' AND '2019/04/30' AND us.defaultdeptid IN (3,4); ```

提示No getter method for property 错误?想不明白!

我写个简单的struts1.2的关于人员信息管理的东西在写好pojo、action、actionform并在xml中做好相关配置后,访问前台注册页面时总提示: javax.servlet.jsp.JspException: No getter method for property user.owner of bean org.apache.struts.taglib.html.BEAN at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:973) at org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:121) at org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102) at org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:81) at _jsp._register__jsp._jspService(register.jsp:36) at com.caucho.jsp.JavaPage.service(JavaPage.java:61) at com.caucho.jsp.Page.pageservice(Page.java:578) at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:192) at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:175) at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:240) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263) at com.caucho.server.port.TcpConnection.run(TcpConnection.java:481) at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:685) at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:607) at java.lang.Thread.run(Thread.java:595) pojo类public class Users implements Serializable { private String name, pwd,phone,address, owner; setter/getter } 我的注册页面的内容是: <%@ page language="java" pageEncoding="UTF-8"%> <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%> <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%> <%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%> <html:errors /> <html:form action="/register.do" method="post"> <table border="0"> <tr> <td> 用户名: </td> <td> <html:text property="user.owner" /> </td> </tr> <tr> <td> 密码: </td> <td> <html:password property="user.pwd" /> </td> </tr> <tr> <td> 地址: </td> <td> <html:text property="user.address" /> </td> </tr> <tr> <td> 电话: </td> <td> <html:text property="user.phone" /> </td> </tr> <tr> <td> <center> <html:submit value="注册" /> &nbsp; <html:reset value="重置" /> </center> </td> </tr> </table> </html:form> 我的action是 public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { // TODO Auto-generated method stub RegisterForm regForm = (RegisterForm) form; String owner = regForm.getOwner(); String pwd = regForm.getPwd(); String address = regForm.getAddress(); String phone = regForm.getPhone(); Users user = new Users(); user.setOwner(owner); user.setPwd(pwd); user.setAddress(address); user.setPhone(phone); //user.setName(null); //test this line !!! String result=null; boolean boo=false; try { UserServers us = new UserServers(); boo=us.addUser(user); } catch (Exception e) { e.printStackTrace(); } if (boo == true) { return (mapping.findForward("success")); } else { return (mapping.findForward("fail")); } } actionform是这样写的 public void reset(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub users = new Users(); } @Override public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { // TODO Auto-generated method stub ActionErrors errors = new ActionErrors(); if ((users.getOwner() == null) || (users.getOwner().length() < 6)) errors.add("owner", new ActionMessage("error.owner.required")); if ((users.getPwd() == null) || (users.getPwd().length() < 6)) errors .add("password", new ActionMessage( "error.password.required")); if ((users.getAddress() == null) || (users.getAddress().length() < 1)) errors.add("address", new ActionMessage("error.address.required")); if ((users.getPhone() == null) || (users.getPhone().length() < 1)) errors.add("phone", new ActionMessage("error.phone.required")); return errors; } public Users getUsers() {} public void setUsers(Users users) {} public void setOwner(String owner) { } public String getOwner() {} public void setPwd(String pwd) {} public String getPwd() {} public String getAddress() {} public void setAddress(String address) {} public String getPhone() {} public void setPhone(String phone) {} xml中的配置 <form-beans> <form-bean name="userForm" type="org.forms.UserForm" /> <form-bean name="InsertConsumeForm" type="org.forms.InsertConsumeForm" /> <form-bean name="registerForm" type="org.forms.RegisterForm" /> </form-beans> <action-mappings> <action path="/register" type="org.actions.RegisterAction" name="registerForm" scope="request" validate="true" input="/register.jsp"> <forward name="success" path="/functionpage.jsp"/> <forward name="fail" path="/register.jsp"/> </action> </action-mappings> [b]问题补充:[/b] 二楼仁兄,我以前就试验过了,和那个没关系的。

MyBatis 传参错误……

我想要在JSP中通过两个date传参到action,然后想通过两个日期查询出表里的内容,但是参数传递到serviceImp的时候就卡住了……还是个小白所以很多不懂的(╥╯^╰╥)……相关代码全部贴出来了……希望大大们能解答一下…… 我个人感觉可能是mapper里面没有对两个参数进行注解,但是我不懂怎么改…… 先贴出报错…… 严重: Servlet.service() for servlet [springmvc] in context with path [/MedicalExaminationSystem] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'payDate' not found. Available parameters are [0, 1, param1, param2]] with root cause org.apache.ibatis.binding.BindingException:** Parameter 'payDate' not found. Available parameters are [0, 1, param1, param2]** at org.apache.ibatis.binding.MapperMethod$ParamMap.get(MapperMethod.java:165) ache.ibatis.reflection.wrapper.MapWrapper.get(MapWrapper.java:44) //action类 @Controller public class ReportAction { @Autowired IReportService Service; @RequestMapping("/getPayM") // 通过两个日期查询两个日期内的金额 public ModelAndView GetPayMoney(Date date1, Date date2) { ModelAndView modelAndView = new ModelAndView("Report"); System.out.println("开始日期=" + date1); System.out.println("结束日期=" + date2); TPayMoney list = Service.querySumMoney(date1, date2); System.out.println("跳转信息发送到界面" + list); if (list != null) {// 判断不为空跳转 System.out.println("返回"); modelAndView.addObject(list); return modelAndView; } else { return modelAndView; } } } //service接口 public interface IReportService { public TPayMoney querySumMoney(Date date1,Date date2); } //servic实现类 @Service public class ReportServiceImp implements IReportService{ @Autowired private TPayMoneyMapper payMoneyMapper; @Override public TPayMoney querySumMoney(Date date1, Date date2) { System.out.println("ipm date1"+date1); System.out.println("ipm date2"+date2);//还可以读取到 TPayMoney list = payMoneyMapper.selectByDate(date1, date2); System.out.println("出的来么"+list);//这里就读不出来了 if (list != null) { return list; } return null; } } //bean类 public class TPayMoney { private BigDecimal payId; private BigDecimal batId; private BigDecimal payAccount; private BigDecimal payPays; private String payState; private Date payDate; public BigDecimal getPayId() { return payId; } public void setPayId(BigDecimal payId) { this.payId = payId; } public BigDecimal getBatId() { return batId; } public void setBatId(BigDecimal batId) { this.batId = batId; } public BigDecimal getPayAccount() { return payAccount; } public void setPayAccount(BigDecimal payAccount) { this.payAccount = payAccount; } public BigDecimal getPayPays() { return payPays; } public void setPayPays(BigDecimal payPays) { this.payPays = payPays; } public String getPayState() { return payState; } public void setPayState(String payState) { this.payState = payState == null ? null : payState.trim(); } public Date getPayDate() { return payDate; } public void setPayDate(Date payDate) { this.payDate = payDate; } } //mapper @Repository public interface TPayMoneyMapper { //用时间查询内容 TPayMoney selectByDate(Date date1,Date date2); } //mapper.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.great.dao.TPayMoneyMapper"> <resultMap id="BaseResultMap" type="com.great.entity.TPayMoney"> <!-- WARNING - @mbg.generated This element is automatically generated by MyBatis Generator, do not modify. This element was generated on Tue Sep 26 14:09:25 CST 2017. --> <id column="PAY_ID" jdbcType="DECIMAL" property="payId" /> <result column="BAT_ID" jdbcType="DECIMAL" property="batId" /> <result column="PAY_ACCOUNT" jdbcType="DECIMAL" property="payAccount" /> <result column="PAY_PAYS" jdbcType="DECIMAL" property="payPays" /> <result column="PAY_STATE" jdbcType="VARCHAR" property="payState" /> <result column="PAY_DATE" jdbcType="DATE" property="payDate" /> </resultMap> <sql id="Base_Column_List"> <!-- 查询两个日期之间的数据 --> <select id="selectByDate" parameterType="com.great.entity.TPayMoney" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from TBL_PAYMONEY where to_char(TBL_PAYMONEY.pay_date,'yyyy-mm-dd') between '#{payDate}' and '#{payDate}'; </select> </mapper> 最后一个数据库 /*==============================================================*/ /* Table: tbl_paymoney 付款表 */ /*==============================================================*/ create table tbl_paymoney ( pay_id NUMBER(20) not null, bat_id NUMBER(20), pay_account NUMBER(10,2), pay_pays NUMBER(10,2), pay_state VARCHAR2(20), pay_date DATE, constraint PK_TBL_PAYMONEY primary key (pay_id) ); comment on table tbl_paymoney is '付款表'; comment on column tbl_paymoney.pay_id is '付款ID'; comment on column tbl_paymoney.bat_id is '批次ID'; comment on column tbl_paymoney.pay_account is '赊账'; comment on column tbl_paymoney.pay_pays is '已付款金额'; comment on column tbl_paymoney.pay_state is '状态'; comment on column tbl_paymoney.pay_date is '日期';

mybatis中sql问题求解决

在mysql客户端中执行下面语句 ``` select sk.seckill_id, sk.user_phone, sk.create_time, sk.state, s.seckill_id "seckill.seckill_id", s.name "seckill.name", s.number "seckill.number", s.start_time "seckill.start_time", s.end_time "seckill.end_time", s.create_time "seckill.create_time" from success_killed sk inner join seckill s on sk.seckill_id = s.seckill_id where sk.seckill_id=1 and sk.user_phone=13573615842 ``` 没有报错,但是配置在mybatis的xml中会出现下面的错误 信息: Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml] 五月 21, 2016 10:50:17 上午 org.springframework.jdbc.support.SQLErrorCodesFactory <init> 信息: SQLErrorCodes loaded: [DB2, Derby, H2, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase, Hana] 五月 21, 2016 10:50:17 上午 org.springframework.context.support.GenericApplicationContext doClose 信息: Closing org.springframework.context.support.GenericApplicationContext@4351aa16: startup date [Sat May 21 10:50:16 CST 2016]; root of context hierarchy 求解释

SQL语句使用IN类型问题

求高手解答。 ![图片说明](https://img-ask.csdn.net/upload/201501/13/1421125364_188080.png)

org.apache.ibatis.reflection.ReflectionException:

这个报错什么意思? 十二月 23, 2016 9:31:15 上午 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet [spring-dispatcher] in context with path [/JFWorkingHourSystem] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'page' in 'class java.lang.Long'] with root cause org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'page' in 'class java.lang.Long' at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:377) at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:167) at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:149) at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:45) at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:113) at org.apache.ibatis.scripting.xmltags.DynamicContext$ContextMap.get(DynamicContext.java:94) at org.apache.ibatis.scripting.xmltags.DynamicContext$ContextAccessor.getProperty(DynamicContext.java:113) at ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2317) at ognl.ASTProperty.getValueBody(ASTProperty.java:114) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) at ognl.SimpleNode.getValue(SimpleNode.java:258) at ognl.ASTNotEq.getValueBody(ASTNotEq.java:50) at ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212) at ognl.SimpleNode.getValue(SimpleNode.java:258) at ognl.Ognl.getValue(Ognl.java:494) at ognl.Ognl.getValue(Ognl.java:644) at ognl.Ognl.getValue(Ognl.java:619) at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:45) at org.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:29) at org.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:30) at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:29) at org.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:37) at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:275) at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:79) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98) at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358) at com.sun.proxy.$Proxy19.selectOne(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:163) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:43) at com.sun.proxy.$Proxy30.selectByPrimaryKey(Unknown Source) at com.bjhnd.Service.TiZhiCeDingJiYunDongChuFang.Impl.JiBenXinXiServiceImpl.GetJiBenXinXi(JiBenXinXiServiceImpl.java:41) at com.bjhnd.Actions.TiZhiCeDingJiYunDongChuFang.JiBenXinXiAction.GetJiBenXinXi(JiBenXinXiAction.java:22) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.logging.log4j.core.web.Log4jServletFilter.doFilter(Log4jServletFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:617) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:668) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2503) at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2492) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)![图片说明](https://img-ask.csdn.net/upload/201612/23/1482457163_773794.png) 我想要获取当前新用户的ID,查询他的信息。

Java中setter()和getter()问题

自学Java一个星期以来,一直疑惑,在getter()方法和setter()方法中,为什么前者的返回值类型是 String,后者的返回值类型是void。急切希望大神前辈们解惑。

mybatis ReflectionException

映射类里都没有那个字段......也没别的单独设置,求解 错误代码, ``` 严重: Servlet.service() for servlet [spring-dispatcher] in context with path [/sg] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'maga' in 'class com.sg.model.manga'] with root cause org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'maga' in 'class com.sg.model.manga' at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:381) at org.apache.ibatis.reflection.MetaClass.getGetInvoker(MetaClass.java:164) at org.apache.ibatis.reflection.wrapper.BeanWrapper.getBeanProperty(BeanWrapper.java:162) at org.apache.ibatis.reflection.wrapper.BeanWrapper.get(BeanWrapper.java:49) at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:122) at org.apache.ibatis.reflection.MetaObject.metaObjectForProperty(MetaObject.java:145) at org.apache.ibatis.reflection.MetaObject.getValue(MetaObject.java:115) at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:79) at org.apache.ibatis.executor.statement.PreparedStatementHandler.parameterize(PreparedStatementHandler.java:85) at org.apache.ibatis.executor.statement.RoutingStatementHandler.parameterize(RoutingStatementHandler.java:63) at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:77) at org.apache.ibatis.executor.SimpleExecutor.doUpdate(SimpleExecutor.java:48) at org.apache.ibatis.executor.BaseExecutor.update(BaseExecutor.java:115) at org.apache.ibatis.executor.CachingExecutor.update(CachingExecutor.java:75) at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:170) at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:157) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358) at com.sun.proxy.$Proxy13.insert(Unknown Source) at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:240) at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:52) at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:53) at com.sun.proxy.$Proxy15.addManga(Unknown Source) at com.sg.dao.mangaDao.addManga(mangaDao.java:14) at com.sg.service.mangaService.addManga(mangaService.java:16) at com.sg.controller.mangaController.mangaUpload(mangaController.java:58) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215) at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132) at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:781) at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:721) at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83) at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:943) at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:877) at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:966) at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:868) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:842) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:789) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) ``` mybatis.xml配置文件 ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd"> <configuration> <!-- 设置日志打印 --> <settings> <setting name="logImpl" value="LOG4J"/> </settings> <!-- 配置映射类的别名 --> <typeAliases> <typeAlias type="com.sg.model.manga" alias="manga"/> <typeAlias type="com.sg.model.article" alias="article"/> </typeAliases> <!-- 配置Mapper文件的路径 --> <mappers> <mapper resource="com/sg/mapper/articleMapper.xml" /> <mapper resource="com/sg/mapper/mangaMapper.xml"/> </mappers> </configuration> ``` mapper.java ``` package com.sg.mapper; import com.sg.model.manga; public interface mangaMapper { public int addManga(manga m); } ``` mapper.xml ```<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.sg.mapper.mangaMapper"> <insert id="addManga" parameterType="manga"> insert into magalist (mangaName)value(#{maga.mangaName}); </insert> </mapper> ``` model ``` package com.sg.model; import java.util.List; public class manga { private String indexSrc; private List<String> src; private String mangaName; public String getMangaName() { return mangaName; } public void setMangaName(String mangaName) { this.mangaName = mangaName; } private String introduction; private int mg_id; public int getMg_id() { return mg_id; } public void setMg_id(int mg_id) { this.mg_id = mg_id; } public String getIndexSrc() { return indexSrc; } public void setIndexSrc(String indexSrc) { this.indexSrc = indexSrc; } public List<String> getSrc() { return src; } public void setSrc(List<String> src) { this.src = src; } public String getIntroduction() { return introduction; } public void setIntroduction(String introduction) { this.introduction = introduction; } } ``` dao ```package com.sg.dao; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import com.sg.mapper.mangaMapper; import com.sg.model.manga; @Component public class mangaDao { @Autowired private mangaMapper mangaMapper; public int addManga(manga m){ return mangaMapper.addManga(m); } } ```

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

程序员请照顾好自己,周末病魔差点一套带走我。

程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

点沙成金:英特尔芯片制造全过程揭密

“亚马逊丛林里的蝴蝶扇动几下翅膀就可能引起两周后美国德州的一次飓风……” 这句人人皆知的话最初用来描述非线性系统中微小参数的变化所引起的系统极大变化。 而在更长的时间尺度内,我们所生活的这个世界就是这样一个异常复杂的非线性系统…… 水泥、穹顶、透视——关于时间与技艺的蝴蝶效应 公元前3000年,古埃及人将尼罗河中挖出的泥浆与纳特龙盐湖中的矿物盐混合,再掺入煅烧石灰石制成的石灰,由此得来了人...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

我说我不会算法,阿里把我挂了。

不说了,字节跳动也反手把我挂了。

优雅的替换if-else语句

场景 日常开发,if-else语句写的不少吧??当逻辑分支非常多的时候,if-else套了一层又一层,虽然业务功能倒是实现了,但是看起来是真的很不优雅,尤其是对于我这种有强迫症的程序"猿",看到这么多if-else,脑袋瓜子就嗡嗡的,总想着解锁新姿势:干掉过多的if-else!!!本文将介绍三板斧手段: 优先判断条件,条件不满足的,逻辑及时中断返回; 采用策略模式+工厂模式; 结合注解,锦...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

男生更看重女生的身材脸蛋,还是思想?

往往,我们看不进去大段大段的逻辑。深刻的哲理,往往短而精悍,一阵见血。问:产品经理挺漂亮的,有点心动,但不知道合不合得来。男生更看重女生的身材脸蛋,还是...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试:第十六章:Java中级开发(16k)

HashMap底层实现原理,红黑树,B+树,B树的结构原理 Spring的AOP和IOC是什么?它们常见的使用场景有哪些?Spring事务,事务的属性,传播行为,数据库隔离级别 Spring和SpringMVC,MyBatis以及SpringBoot的注解分别有哪些?SpringMVC的工作原理,SpringBoot框架的优点,MyBatis框架的优点 SpringCould组件有哪些,他们...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你打算用Java 8一辈子都不打算升级到Java 14,真香

我们程序员应该抱着尝鲜、猎奇的心态,否则就容易固步自封,技术停滞不前。

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《经典算法案例》01-08:如何使用质数设计扫雷(Minesweeper)游戏

我们都玩过Windows操作系统中的经典游戏扫雷(Minesweeper),如果把质数当作一颗雷,那么,表格中红色的数字哪些是雷(质数)?您能找出多少个呢?文中用列表的方式罗列了10000以内的自然数、质数(素数),6的倍数等,方便大家观察质数的分布规律及特性,以便对算法求解有指导意义。另外,判断质数是初学算法,理解算法重要性的一个非常好的案例。

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

正确选择比瞎努力更重要!

一文带你入门Java Stream流,太强了

两个星期以前,就有读者强烈要求我写一篇 Java Stream 流的文章,我说市面上不是已经有很多了吗,结果你猜他怎么说:“就想看你写的啊!”你看你看,多么苍白的喜欢啊。那就“勉为其难”写一篇吧,嘻嘻。 单从“Stream”这个单词上来看,它似乎和 java.io 包下的 InputStream 和 OutputStream 有些关系。实际上呢,没毛关系。Java 8 新增的 Stream 是为...

立即提问
相关内容推荐