Spring Boot
记录Spring Boot学习
渝晟
一只在it路上探索的小橙子
展开
-
Github 第三方授权登陆
1.在Github上创建一个OAuth App在Github上按照官方文档【Creating an OAuth App】进行操作主要是填写:创建成功之后会得到授权用户数目和授权需要用到的参数:2.授权登陆【Authorizing OAuth Apps官方文档】主要流程分析:获取code通过code获取access_token通过access_token获取用户GitHub账号...原创 2020-05-13 10:58:56 · 1466 阅读 · 1 评论 -
Spring Boot项目整合Mybatis笔记
【官网】mybatis-spring-boot-autoconfigure根据官网内容进行如下操作:1. 添加依赖:复制依赖到自己的项目2.快速设置添加数据源:根据上图内容“Autodetect an existing DataSource【自动检测现有的数据源】”所以需要一个数据源。在pom.xml中添加jdbc或jpa依赖,然后配置基本信息3.创建接口4.调用运行...原创 2020-05-10 15:25:10 · 123 阅读 · 0 评论 -
Spring Boot注解笔记
常用注解:1.@RestController@RestController注解相当于@ResponseBody和@Controller的结合@RestController注解时,返回对象会被自动序列化成JSON@RestController注解时,返回的是内容实例ps:@ResponseBody:The @ResponseBody annotation tells a cont...原创 2020-04-16 11:15:26 · 182 阅读 · 0 评论 -
Spring Boot之连接数据库(Jpa)+增删改查的实现
Spring-Data-JpaJPA(Java Persistence API)定义了一系列对象持久化的标准,目前实现这-规范的产品有Hibernate、TopLink等。1.引入依赖在pom中添加依赖,无需加版本号,添加后重新导入一下maven<dependency> <groupId>org.springframework.boot</gro...原创 2020-04-01 17:47:45 · 471 阅读 · 0 评论