Stella981 Stella981
3年前
Spring Boot集成Redis,这个坑把我害惨了!
!(https://oscimg.oschina.net/oscnet/836578aaa3154dfd81af46af9176a5d5.jpg)最近项目中使用SpringBoot集成Redis,踩到了一个坑:从Redis中获取数据为null,但实际上Redis中是存在对应的数据的。是什么原因导致此坑的呢?本文就带大家从SpringBoo
Stella981 Stella981
3年前
Spring Boot (七)MyBatis代码自动生成和辅助插件
一、简介1.1MyBatisGenerator介绍MyBatisGenerator是MyBatis官方出品的一款,用来自动生成MyBatis的mapper、dao、entity的框架,让我们省去规律性最强的一部分最基础的代码编写。1.2MyBatisGenerator使用MyBatisGenera
Stella981 Stella981
3年前
Spring Cloud Alibaba系列(二)nacos作为服务配置中心
SpringCloudAlibaba系列(二)nacos作为服务配置中心Nacos提供用于存储配置和其他元数据的key/value存储,为分布式系统中的外部化配置提供服务器端和客户端支持。使用SpringCloudAlibabaNacosConfig,您可以在NacosServer集中管理你SpringCloud应用的外部
Stella981 Stella981
3年前
Spring Boot 解决跨域问题的 3 种方案!
!(https://oscimg.oschina.net/oscnet/bdc93b87e7d9485f812bbd398ef3aaa9.jpg)作者|telami来源|telami.cn/2019/springbootresolvecors前后端分离大势所趋,跨域问题更是老生常谈,随便用标题去google或百度一
Stella981 Stella981
3年前
Elasticsearch学习(3) spring boot整合Elasticsearch的原生方式
前面我们已经介绍了springboot整合Elasticsearch的jpa方式,这种方式虽然简便,但是依旧无法解决我们较为复杂的业务,所以原生的实现方式学习能够解决这些问题,而原生的学习方式也是Elasticsearch聚合操作的一个基础。一、修改springboot的application.properties配置文件端口号
Stella981 Stella981
3年前
Spring Boot 中三种跨域场景总结
@\toc\跨域这个问题松哥之前写过文章,但是最近收到小伙伴们的一些问题,让我发现之前的总结不够全面,因此打算再写一篇文章,来和大家分享一下SpringBoot中的跨域问题。这次我把SpringBoot中的跨域问题分为了三个场景:普通跨域SpringSecurity跨域OAuth2跨域分
Stella981 Stella981
3年前
Spring Boot的web开发&静态资源配置方式
Web开发的自动配置类:org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration!(https://oscimg.oschina.net/oscnet/f5e5f3f2174457ca2542b3345b3bb7eb116.jpg)1.1.自动配置的ViewResolv
Stella981 Stella981
3年前
Spring Data JPA通过方法名查询实战+源码分析
前几天接触到SpringDataJPA访问数据库的项目,看源代码时发现有的Repository上面的部分接口没有实现类,但是系统却可以正常运行,这引起了我的好奇心,决定花点时间研究下,于是便有了此文。先来看看是哪些接口可以不用实现:XxxfindByXxxAndXxOrderByXxDesc(Stringarg1,Stringarg2
Stella981 Stella981
3年前
Spring Cloud 项目 SpringApplication Run 执行两次解密
ApplicationContextInitializer介绍作用是在ConfigurableApplicationContext类型的ApplicationContext.refresh操作之前,允许我们对ConfiurableApplicationContext增强处