1、统一异常处理类package cn.hadron.controller;import org.springframework.web.bind.annotation.ControllerAdvice;import org.springframework.web.bind.annotation.E ...
分类:
编程语言 时间:
2020-06-28 22:43:53
阅读次数:
71
作为java开发的IDE,idea的2020 社区办还是比较好用的,比2018版的改进不少。 一个java注解的简单例子 package main;import java.lang.annotation.ElementType;import java.lang.annotation.Retentio ...
分类:
编程语言 时间:
2020-06-27 22:50:58
阅读次数:
131
Mybatis核心包 包名称包内内容简介 annotation 注解目录。包括所有的注解。如@SELECT,@UPDATE等 binding Mapper类的实例反射生成工具目录 builder 主要是注解,mapper和SqlSuorce的构造器及转换器 cache Mybatis内部缓存接口。实 ...
分类:
编程语言 时间:
2020-06-23 18:53:16
阅读次数:
79
spring中的Bean,作用域的种类(单例和原型),Bean的三种装配方式(xml装配,annotation装配,自动装配) ...
分类:
编程语言 时间:
2020-06-21 14:17:13
阅读次数:
60
今天重温Springmvc视频的时候跟着视频新建了一遍项目,在springmvc配置文件中添加了注解 <mvc:default-servlet-handler/> 环境搭配正确,但是Controller请求一直404错误,后来才解决, 需要搭配<mvc:annotation-driven/> <!- ...
分类:
编程语言 时间:
2020-06-21 10:14:41
阅读次数:
72
增加对annotation的支持,查找@Controller下的@RequestMapping 代码:https://github.com/kuotian/springmvc_me 1. 注解 @Controller @Target(ElementType.TYPE) @Retention(Rete ...
分类:
编程语言 时间:
2020-06-18 22:13:41
阅读次数:
66
验证码 1. 本质:图片 2. 目的:防止恶意表单注册 import javax.imageio.ImageIO; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import ja ...
分类:
编程语言 时间:
2020-06-18 22:06:40
阅读次数:
71
java.lang.NoClassDefFoundError: org/springframework/core/annotation/MergedAnnotations$SearchStrategy 当你发现有这个错误的时候,检查一下自己测试的依赖版本是否一致。 ...
分类:
编程语言 时间:
2020-06-16 18:30:35
阅读次数:
121
@SentinelResource 注解的使用方法 官网文档:Sentinel 注解支持 对应 Spring 中的切面:SentinelResourceAspect /** * Aspect for methods with {@link SentinelResource} annotation. ...
分类:
Web程序 时间:
2020-06-14 14:40:22
阅读次数:
90
1.添加配置类 package org.jcut.tools; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org ...
分类:
编程语言 时间:
2020-06-14 13:00:51
阅读次数:
56