
SpringBoot
singular港
共生关系,指两种生物互利生活在一起,缺失彼此,生活会受到极大影响,甚至死亡。
展开
-
SpringBoot+Vue前后端分离之Cors解决方案
做毕设的时候发现了这个问题,跨域问题还是比较常见的,简单的记录下我的解决方法吧一、跨域问题发生的情况?域名不同域名相同端口不同二、解决方法1、Vue项目配置代理解决(基于vue-cli2.0的项目)打开config/index.js,在proxyTable中添写如下代码,具体配置如下: proxyTable: { '/': { /...原创 2020-04-01 00:45:20 · 2063 阅读 · 0 评论 -
安全认证之JWT令牌
一、使用JWT的思路1.1、使用JWT的思路用户认证通过会得到一个JWT令牌,JWT令牌中已经包括了用户相关的信息,客户端只需要携带JWT访问资源服务,资源服务根据事先约定的算法自行完成令牌校验,无需每次都请求认证服务完成授权。1.2、JWT简介JSON Web Tokens are an open, industry standard method for represe...原创 2019-09-23 22:00:26 · 601 阅读 · 0 评论 -
SpringBoot之@ConfigurationProperties取消location注解后的替代方案
问题:在Spring Boot(版本1.5.1.RELEASE)项目中,当准备映射自定义的配置文件属性到类中的时候,发现原本的@ConfigurationProperties注解已将location属性移除,因此导致无法正常给配置类的属性赋值package org.springframework.boot.context.properties;import java.lang.ann...原创 2019-09-17 23:48:38 · 412 阅读 · 0 评论 -
SpringBoot整合持久层
整合JdbcTemplate 整合Mybatis 整合SpringDataJpa一、整合JdbcTemplate JdbcTemplate类是JDBC核心包中的中心类。它简化了JDBC的使用,有助于避免常见错误。它执行核心JDBC工作流,使应用程序代码提供SQL并提取结果。此类执行SQL查询或更新,启动对ResultSet的迭代并捕获JDBC异常并将它们转换为org.spr...原创 2019-08-16 17:14:34 · 995 阅读 · 0 评论 -
SpringBoot整合视图层
整合Thymeleaf 整合FreeMarker一、整合Thymeleaf1.1、添加依赖 <!--整合thymeleaf--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-s...原创 2019-08-13 17:24:29 · 136 阅读 · 0 评论 -
SpringBoot基础配置
一、配置banner1.1、在resources下新建banner.txt__ _ _______ ____ _________ ____ \ \/ \/ /\__ \ / ___\ / ___\__ \ / ___\ \ / / __ \_/ /_/ > /_/ > __ \_/ /_/ > \/\_/ ...原创 2019-08-13 15:03:38 · 168 阅读 · 0 评论 -
SpringCloud之Feign
一、Feign简介Feign可以把Rest的请求进行隐藏,伪装成类似SpringMVC的Controller一样。你不用再自己拼接url,拼接参数等等操作,一切都交给Feign去做。1.1、Feign的简介二、Feign的快速入门2.1、导入依赖 <!--引入feign的依赖--> <dependency> ...原创 2019-07-28 12:05:42 · 153 阅读 · 0 评论 -
SpringCloud之Hystix(熔断器)
一、Hystix概述1.1、简介 Hystrix is a latency and fault tolerance library designed to isolate points of access to remote systems, services and 3rd party libraries, stop cascading failure and enable ...原创 2019-07-28 11:19:22 · 382 阅读 · 0 评论 -
Eureka快速入门
一、SpringCloud简介1.1、概述 Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circui...原创 2019-07-27 18:37:07 · 1956 阅读 · 2 评论 -
SpringBoot整合其他技术
一、SpringBoot整合Mybatis1.1、添加Mybatis的依赖<dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <ver...原创 2019-08-05 00:36:32 · 356 阅读 · 0 评论 -
SpringBoot实践
在数据库中引入一张数据表tb_userCREATE TABLE `tb_user` ( `id` int ( 11 ) NOT NULL, `username` varchar ( 10 ) DEFAULT NULL, `password` varchar ( 100 ) DEFAULT NULL,PRIMARY KEY ( `id` ) ) ENGINE = InnoDB DEF...原创 2019-07-26 20:11:24 · 187 阅读 · 0 评论 -
SpringBoot快速入门
一、SpringBoot简介1.1、Overview Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".We take an opinionated view of the Spring plat...原创 2019-07-26 16:37:45 · 190 阅读 · 0 评论