彩神排列三_神彩排列三官方

SpringBoot实战(十二)之集成kisso

时间:2019-12-25 11:48:52 出处:彩神排列三_神彩排列三官方

关于kisso介绍,我们 时要参考官方文档将会是我的博客:https://www.cnblogs.com/youcong/p/9794735.html

package com.baomidou.kisso;

}

@ControllerAdvice

@Configuration

public class WebConfig extends WebMvcConfigurerAdapter {

}

按照如下流程测试:

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

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;

package com.baomidou.kisso;

一、导入maven依赖

@Controller

public class SampleController {

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;

二、编写启动类

四、编写WebConfig类

}

@SpringBootApplication

public class Application {

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

server:

import org.slf4j.Logger;

import org.slf4j.LoggerFactory;

import org.springframework.boot.SpringApplication;

import org.springframework.boot.autoconfigure.SpringBootApplication;

2.登陆

三、编写Controller

kisso:

config:

六、启动项目并测试

五、编写application.yml配置文件

3.登陆后直接访问

import javax.servlet.http.HttpServletRequest;

import javax.servlet.http.HttpServletResponse;

1.未登陆时直接访问

热门

热门标签