spring Springboot集成Oracle

Springboog集成oracle数据源(原先已经配置druid项目可以跑起来) 1:集成坐标 <dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6...

2022-12-10 468 阅读

spring 使用Vue+ElementUI+Axios+SpringBoot实现文件上传

网上的很多上传文件教程基本上都是采用了在action那里加上后端请求的路径,直接提交到后端,但是我由于后端设置了token,不能这样子,必须自己用axios请求。 1.项目后端使用的是SpringBoot...

2022-12-10 346 阅读

spring springboot之Date格式化

问题场景:   在springboot应用中,@RestController层注解的json默认序列化中,日期格式默认为:2018-06-17T07:24:07.430+0000。   日常需求中,往往需要将日期转化为 修改方法:   ...

2022-12-10 295 阅读

spring springboot+Oauth2——自定义AuthenticationManager和认证path

本人在工作中需要构建这么一个后台框架,基于springboot,登录时认证使用自定义AuthenticationManager;同时支持Oauth2访问指定API接口,认证时的AuthenticationManager和登录规则不同。在研...

2022-12-10 406 阅读

spring springboot整合oauth2

1、pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" x...

2022-12-10 296 阅读

spring springboot整合netty无法autowired依赖注入的问题

因为在初始话netty的时候,handler是new出来的,没有托给spring容器管理,所以无法依赖注入,解决方法也很简单:第一步:加@component @Component public class handler extends SimpleChannelInbo...

2022-12-10 403 阅读

spring Springboot整合Sqlite3

整合步骤如下: 1、新建springboot工程,选择web工程。 2、添加依赖 <dependencies> <dependency> <groupId>org.springframework.boot</groupId&g...

2022-12-10 487 阅读

java Java实现支付宝沙箱支付springboot

一.支付宝测试环境开发的前期准备 1.下载Java支付的demo   demo下载地址:https://docs.open.alipay.com/270/106291/ 1.下载解压导入idea readme.txt请好好看一下,里边是关于一些下载de...

2022-12-10 270 阅读

spring SpringBoot 参数校验的方法

Introduction 有参数传递的地方都少不了参数校验。在web开发中,前端的参数校验是为了用户体验,后端的参数校验是为了安全。试想一下,如果在controller层中没有经过任何校验的参数通过servi...

2022-12-10 257 阅读

spring SpringBoot参数校验注解

SpringBoot参数校验注解 使用自定义参数校验的优势 1.消除耦合,如果哪天你需要更改正则表达式你需要在每个引用的地方进行更改 2.通俗易懂,可以一目了然表示这是一个手机校验的注解,即便...

2022-12-10 319 阅读