今天在做 excel导出的时候,出现了一个问题"java.lang.ClassCastException: java.lang.String cannot be cast to com.domain.xxx": 公司用hibernate,查询时候可以用sql和hql,用什么一般看心情,第一次查询用的是select g.* from persion g ,site s where g.wz=s.dz(当然都是简写); 当get实体导出的 时候出现了" java.lang.Cla…
在使用spring mvc中,绑定页面传递时间字符串数据给Date类型是出错: Failed to convert property value of type [java.lang.String] to required type [java.util.Date] for property 'expert.birthdate'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of typ…
没有选择附件,但是点击上传按钮的时候会报错. 之前不选择文件,直接上传空文件是可以的,后来不知道改了什么就不行了. 错误信息: -- :: [http--] TRACE org.springframework.beans.TypeConverterDelegate - Field [] isn't an enum value java.lang.NoSuchFieldException: at java.lang.Class.getField(Unknown Source) at org.spr…
springboot jdbc查询使用LocalDate报:Failed to convert value of type 'java.lang.String' to required type 'java.time.LocalDate'; 解决办法: 添加该注解即可通过日期查找记录: @DateTimeFormat(iso = DateTimeFormat.ISO.DATE) 查询结果: …
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in URL [jar:file:/G:/idjavacode/pygqingmu2parent/pyg_qingmu2_service_sellergoods/target/pyg_qingmu2_service_sellergoods/WEB-INF/lib/pyg…
spring boot 前台GET请求,传递时间类型的字符串,后台无法解析,报错:Failed to convert from type [java.lang.String] to type [java.util.Date] 而POST请求,传入时间类型字符串,后台是可以解析成Date类型的. 出现这个错误,在需要接受Date类型的字符串参数的controller层中,加入: @InitBinder public void initBinder(WebDataBinder binder) { S…
后台API查询接口,get请求,后台Date字段接收前台String类型的时间筛选条件 后台接口接收 使用的实体 而createDate字段在后台实体中是Date类型 报错信息: org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errors Field error in object 'huaYangArea' on field 'c…
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tacPageOfficePblmListServiceImpl': Unsatisfied dependency expressed through field 'tacPageOfficePblmListDao'; nested exception is org.springframework.bea…
Failed to convert value of type 'java.lang.String' to required type 'java.util.Date' 首先这个错误的意思是 前台页面传递在string类型的时间数据,比如'2020-05-31 10:00:00' 后台使用Date类型去接收,但是报错了. 解决方法: 要解决这个问题其实很简单, 在接收的字段上面,添加下面的注解 就可以了 @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss"…
今天做springbook项目前端输入日期传到数据库保存报了一下错误 Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Sun Feb 09 16:31:32 CST 2020 There was an unexpected error (type=Bad Request, status=400). Validation…
springMVC action接收参数: org.springframework.validation.BindException: org.springframework.validation.BeanPropertyBindingResult: 1 errorsField error in object 'projectStep' on field 'createDate': rejected value [2016-6-23]; codes [typeMismatch.projectSt…
严重: Servlet.service() for servlet [spring] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException: ### E…
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:132) at org.springframework.test.context.suppo…
org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'logging.level' to java.util.Map<java.lang.String, java.lang.String> at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.ja…
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:125) at org.springframework.test.context.suppo…
在项目开发中自定义了一个maven plugin,在本地能够很好的工作,但是在ci server上却无法正常工作报错为: ----------------------------------------------------- at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:225) at org.apache.maven.lifecycle.internal.MojoExecutor.…
javax.el.PropertyNotFoundException: Property 'name' not found on type java.lang.String javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193) javax.el.BeanELResolver.property(BeanELResolver.java:267) javax.el.BeanELResolver.getValue(Bean…
具体错误: No qualifying bean of type [java.lang.String] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {} 原因: 1.对应要注入的实现类没有 加注解,如dao层 @Repository 如service层 @Service 2."Y…
mybatis3 : mysql文如下,传入参数为string类型时‘preCode’,运行报错为:There is no getter for property named 'preCode' in 'class java.lang.String 执行sql: mapper.xml文件: <select id="getMaxCode" parameterType="string" resultType="string"> sele…
转载自://http://www.cnblogs.com/anee/p/3324140.html 用mybatis查询时,传入一个字符串传参数,且进行判断时,会报 There is no getter for property named 'moduleCode' in 'class java.lang.String 错误写法: <select id="queryAllParentModule" resultType="jobModule" parameter…