码迷,mamicode.com
首页 >  
搜索关键字:annotation    ( 2536个结果
SpringBoot 2.x 统一异常处理
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注解的简单使用
作为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
java中的mybatis是什么?
Mybatis核心包 包名称包内内容简介 annotation 注解目录。包括所有的注解。如@SELECT,@UPDATE等 binding Mapper类的实例反射生成工具目录 builder 主要是注解,mapper和SqlSuorce的构造器及转换器 cache Mybatis内部缓存接口。实 ...
分类:编程语言   时间:2020-06-23 18:53:16    阅读次数:79
Spring中的Bean
spring中的Bean,作用域的种类(单例和原型),Bean的三种装配方式(xml装配,annotation装配,自动装配) ...
分类:编程语言   时间:2020-06-21 14:17:13    阅读次数:60
创建springmvc项目使用<mvc:default-servlet-handler/>注解Controller失效
今天重温Springmvc视频的时候跟着视频新建了一遍项目,在springmvc配置文件中添加了注解 <mvc:default-servlet-handler/> 环境搭配正确,但是Controller请求一直404错误,后来才解决, 需要搭配<mvc:annotation-driven/> <!- ...
分类:编程语言   时间:2020-06-21 10:14:41    阅读次数:72
手写 简易 Spring MVC v2(增加对annotation的支持)
增加对annotation的支持,查找@Controller下的@RequestMapping 代码:https://github.com/kuotian/springmvc_me 1. 注解 @Controller @Target(ElementType.TYPE) @Retention(Rete ...
分类:编程语言   时间:2020-06-18 22:13:41    阅读次数:66
案例:Java 简单写一个验证码
验证码 1. 本质:图片 2. 目的:防止恶意表单注册 import javax.imageio.ImageIO; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import ja ...
分类:编程语言   时间:2020-06-18 22:06:40    阅读次数:71
使用spring-test时报错
java.lang.NoClassDefFoundError: org/springframework/core/annotation/MergedAnnotations$SearchStrategy 当你发现有这个错误的时候,检查一下自己测试的依赖版本是否一致。 ...
分类:编程语言   时间:2020-06-16 18:30:35    阅读次数:121
Sentinel:SentinelResourceAspect
@SentinelResource 注解的使用方法 官网文档:Sentinel 注解支持 对应 Spring 中的切面:SentinelResourceAspect /** * Aspect for methods with {@link SentinelResource} annotation. ...
分类:Web程序   时间:2020-06-14 14:40:22    阅读次数:90
spring boot文件路径映射配置
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
2536条   上一页 1 ... 8 9 10 11 12 ... 254 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!