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
ORM(O/R Mappping对象关系映射)的基础概念 在我们的系统中,存在大量的需要进行持久化存储的对象,这些对象可能是各种各样的业务单据,也可能是我们的系统配置信息等。另外一些属于内存中使用而不需要进行持久化存储的对象,不属于我们的讨论范围。而在支持对象序列化的语言比如C#,Java中,我们可 ...
分类:
编程语言 时间:
2020-07-18 00:44:02
阅读次数:
64
反射操作注解获得注解信息 练习:ORM 代码练习 import java.lang.annotation.*; import java.lang.reflect.Field; //练习反射操作注解 public class Test12 { public static void main(Strin ...
分类:
其他好文 时间:
2020-07-18 00:40:31
阅读次数:
78
看源码能力还有限,看看别人的讲法就行。这个也被称为脏检查,主要通过快照进行对比以便减少数据库访问次数,同时批量执行sql。 参考链接:https://www.cnblogs.com/wl0000-03/p/6269786.html ...
分类:
Web程序 时间:
2020-07-16 21:56:26
阅读次数:
86
SSH框架是Struct+Spring+Hibernate,SSM是指的Spring-MVC+Spring+MyBatis 1、Struct和Spring-MVC:SpringMVC的控制层是Controller,Structs的控制层是Action。SpringMVC的Controller和Str ...
分类:
其他好文 时间:
2020-07-16 20:58:33
阅读次数:
56