会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
kelelipeng
博客园
首页
新随笔
联系
管理
订阅
上一页
1
···
69
70
71
72
73
74
75
下一页
2018年12月27日
springboot 参数校验详解
摘要: https://www.jianshu.com/p/89a675b7c900 在日常开发写rest接口时,接口参数校验这一部分是必须的,但是如果全部用代码去做,显得十分麻烦,spring也提供了这部分功能,本文来探究一下如何实现 1.配置 spring-boot-starter-web包自动依赖hi
阅读全文
posted @ 2018-12-27 11:15 kelelipeng
阅读(1843)
评论(0)
推荐(0)
2018年12月26日
springboot使用hibernate validator校验
摘要: https://www.cnblogs.com/mr-yang-localhost/p/7812038.html#_label0 目录 一、参数校验 二、hibernate validator校验demo 三、hibernate的校验模式 1、普通模式(默认是这个模式) 2、快速失败返回模式 四、h
阅读全文
posted @ 2018-12-26 17:15 kelelipeng
阅读(276)
评论(0)
推荐(0)
@Inherited:允许子类继承父类的注解。
摘要: 在看定义注解的相关文章的时候,看到这个@Inherited注解,简单的说明并没有真正搞懂是什么意思。在网上搜索了一些相关的内容,现在把一篇文章转载过来。以便后面使用。 文章出处,转载地址:(http://zy19982004.iteye.com/blog/1979520),在此特别感谢! @Inhe
阅读全文
posted @ 2018-12-26 11:43 kelelipeng
阅读(1117)
评论(0)
推荐(0)
springboot跨域配置
摘要: 前言: 当它请求的一个资源是从一个与它本身提供的第一个资源的不同的域名时,一个资源会发起一个跨域HTTP请求(Cross-site HTTP request)。比如说,域名A ( http://domaina.example ) 的某 Web 应用程序中通过< img>标签引入了域名B( http:
阅读全文
posted @ 2018-12-26 11:13 kelelipeng
阅读(267)
评论(0)
推荐(0)
spring boot——MockMvc的用法 (SpringBoot 1.5.18)下测试通过
摘要: spring boot——MockMvc的用法 spring boot——MockMvc的用法 https://www.cnblogs.com/0201zcr/p/5756642.html (辅助参考) 1.pom配置 <dependency> <groupId>org.springframewor
阅读全文
posted @ 2018-12-26 11:00 kelelipeng
阅读(554)
评论(0)
推荐(0)
2018年12月25日
spring boot(10) 基础学习内容
摘要: A Spring boot(10) 基础学习内容 B SpringBoot(16) 基础学习内容
阅读全文
posted @ 2018-12-25 16:25 kelelipeng
阅读(144)
评论(0)
推荐(0)
2018年12月24日
关于Spring @RequestBody 自动映射模型原理
摘要: 关于Spring @RequestBody 自动映射模型 2016年10月18日 22:17:12 稻子丶 阅读数:5049 关于Spring @RequestBody 自动映射模型 2016年10月18日 22:17:12 稻子丶 阅读数:5049 关于Spring @RequestBody 自动
阅读全文
posted @ 2018-12-24 18:59 kelelipeng
阅读(1012)
评论(0)
推荐(0)
@Requestbody@ApiParam @PathVariable @RequestParam三者区别
摘要: 一、问题描述 由于项目是前后端分离,因此后台使用的是spring boot,做成微服务,只暴露接口。接口设计风格为restful的风格,在get请求下,后台接收参数的注解为RequestBody时会报错;在post请求下,后台接收参数的注解为RequestParam时也会报错。 二、问题原因 由于s
阅读全文
posted @ 2018-12-24 18:39 kelelipeng
阅读(985)
评论(0)
推荐(0)
@ModelAttribute使用详解
摘要: @ModelAttribute使用详解 @ModelAttribute使用详解 @ModelAttribute使用详解 @ModelAttribute可以作用在方法或者方法的参数 注:被@ModelAttribute注释的方法会在此controller每个方法执行前被执行,因此对于一个control
阅读全文
posted @ 2018-12-24 17:01 kelelipeng
阅读(2167)
评论(0)
推荐(0)
@SessionAttribute使用详解
摘要: @SessionAttribute使用详解 @SessionAttribute使用详解 @SessionAttribute使用详解 @ModelAttribute注解作用在方法上或者方法的参数上,表示将被注解的方法的返回值或者是被注解的参数作为Model的属性加入到Model中,然后Spring框架
阅读全文
posted @ 2018-12-24 17:00 kelelipeng
阅读(3291)
评论(0)
推荐(0)
上一页
1
···
69
70
71
72
73
74
75
下一页
公告