org.springframework.web.method.annotation.MethodArgumentTypeMismatchException: Failed to convert value of type 'java.lang.String' to required type 'lo ...
分类:
编程语言 时间:
2020-07-30 01:54:09
阅读次数:
131
学习注解,从注释和源码入手 注释 部分关键注释,我自己标注了一些中文注释便于理解: 注解想要被设置成异步的方法 /** * Annotation that marks a method as a candidate for <i>asynchronous</i> execution. * Can a ...
分类:
其他好文 时间:
2020-07-27 23:32:27
阅读次数:
89
解决办法:import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;import org.springframework.context.annotation.Bean;import org... ...
分类:
其他好文 时间:
2020-07-26 01:44:21
阅读次数:
119
package com.summer.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org ...
分类:
编程语言 时间:
2020-07-24 21:14:33
阅读次数:
58
Spring1.1.1.1创建一个beanpackagecom.zt.spring;publicclassMyBean{privateStringuserName;privateIntegeruserAge;}1.1.1.2配置Config配置beanpackagecom.zt.spring;importorg.springframework.context.annotation.Bean;imp
分类:
编程语言 时间:
2020-07-24 13:30:44
阅读次数:
72
1)定义切面; Log.java package com.seecen.redis.aop; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annota ...
分类:
编程语言 时间:
2020-07-23 01:38:06
阅读次数:
118
{"msg":"Could not marshal [ResultVo [code=100, result=null, message=ok, exception=null, data=null]]: null; nested exception is javax.xml.bind.MarshalException\n - with linked exception:\n[com.sun.istack.SAXException2: unable to marshal type \"com.domain.ResultVo\" as an element because it is missing an @XmlRootElement annotation]","errorcode":2}
分类:
其他好文 时间:
2020-07-20 11:05:43
阅读次数:
87
需要序列化的类需实现接口: public class ResponseModel implements Serializable { 序列化和反序列化代码例子: import com.fasterxml.jackson.annotation.JsonInclude; import com.faste ...
分类:
Web程序 时间:
2020-07-19 16:07:17
阅读次数:
101
官网:https://docs.spring.io/spring/docs/5.2.7.RELEASE/spring-framework-reference/core.html#beans-annotation-config 1、导入约束 2、配置注解支持 <?xml version="1.0" e ...
分类:
编程语言 时间:
2020-07-19 00:44:39
阅读次数:
89
前后端项目分离,跨域请求时,后端的两种配置方式: 1.配置类: package com.helq3.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annot ...
分类:
编程语言 时间:
2020-07-18 21:52:43
阅读次数:
86