
SpringBoot
SpringBoot
随风去。
莫道浮云终蔽日,严冬过尽春蓓蕾。
展开
-
cas单点登录服务部署及SpringBoot集成客户端
服务部署:环境准备: JDK: 1.8 cas-overlay-template :5.3.xhttps://github.com/apereo/cas-overlay-template maven:3.6.3 导入IDEA,此时会去下载一个依赖:cas-server-webapp-tomcat-5.3.14.war,具体的版本可以根据IDEA的提示去下载。可以...原创 2020-04-03 14:29:00 · 1069 阅读 · 0 评论 -
SpringBoot自定义Starter实现
自定义Starter: Starter会把所有用到的依赖都给包含进来,避免了开发者自己去引入依赖所带来的麻烦。Starter 提供了一种开箱即用的理念,其中核心就是springboot的自动配置原理相关,调用相关的注解实现条件判断,进而进行Bean的注入管理。 基于SpringBoot自动配置原理的学习,现在我们来实现一下自定义starter。我们假设有一个格式化的,暂定两个...原创 2019-09-25 18:04:00 · 944 阅读 · 0 评论 -
SpringBoot整合mybatis多数据源,支持分布式事务
编码工具:IDEASpringBoot版本:2.0.1JDK版本:1.81.使用IDEA构建一个Maven工程 ,添加依赖:<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="ht...原创 2019-01-24 16:18:00 · 957 阅读 · 0 评论 -
spring boot 整合 shiro
shrio官网:https://shiro.apache.org/Apache Shiro是一个功能强大且易于使用的Java安全框架,可执行身份验证,授权,加密和会话管理。借助Shiro易于理解的API,您可以快速轻松地保护任何应用程序 - 从最小的移动应用程序到最大的Web和企业应用程序。spring中也有自带的安全框架spring security。shrio是通过对其的再封装,...原创 2018-06-08 14:40:00 · 949 阅读 · 0 评论 -
SpringBoot自动配置原理
1.spring boot启动的时候加载主配置类,开启了自动配置功能@EnableAutoConfiguration,先看一下启动类的main方法public ConfigurableApplicationContext run(String... args) { StopWatch stopWatch = new StopWatch(); s...原创 2018-06-07 17:05:00 · 1043 阅读 · 0 评论 -
spring boot 配置文件
spring boot使用一个全局配置文件:主要是以下两种类型 application.properties :例:server.port=9998 application.yml(YAML) :例:server: port:8080配置文件的作用主要是修改spring boot在底层的默认配置yml:以数据为中心。...原创 2018-06-07 15:20:00 · 1011 阅读 · 0 评论 -
spring boot 解决跨域访问
package com.newings.disaster.shelters.configuration;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframe...原创 2018-06-07 14:30:00 · 969 阅读 · 0 评论 -
spring-boot与spring-data-JPA的简单整合
如何在boot中轻松使用JPA<!--首先引入JPA依赖--><dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId></depende...原创 2018-06-05 13:54:00 · 995 阅读 · 0 评论