SpringBoot实战(十二)之集成kisso

  • 时间:
  • 浏览:0
  • 来源:5分11选5官方_大发5分3D

import com.baomidou.kisso.web.interceptor.SSOSpringInterceptor;

五、编写application.yml配置文件

}

3.登陆后直接访问

1.未登陆时直接访问

关于kisso介绍,大伙可不时需参考官方文档肯能是我的博客:https://www.cnblogs.com/youcong/p/9794735.html

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.stereotype.Controller;

import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.ResponseBody;

@Controller

public class SampleController {

package com.baomidou.kisso;

二、编写启动类

}

@SpringBootApplication

public class Application {

2.登陆

四、编写WebConfig类

import org.springframework.context.annotation.Configuration;

import org.springframework.web.bind.annotation.ControllerAdvice;

import org.springframework.web.servlet.config.annotation.InterceptorRegistry;

import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

按照如下流程测试:

package com.baomidou.kisso;

package com.baomidou.kisso;

kisso:

config:

@ControllerAdvice

@Configuration

public class WebConfig extends WebMvcConfigurerAdapter {

server:

三、编写Controller

一、导入maven依赖

}

import com.baomidou.kisso.security.token.SSOToken;

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

六、启动项目并测试