shiro-spring-boot-starter | 该项目主要利用Spring | Security Framework library
kandi X-RAY | shiro-spring-boot-starter Summary
kandi X-RAY | shiro-spring-boot-starter Summary
该项目主要利用Spring Boot的自动化配置特性来实现快速的将Shiro集成到SpringBoot应用中
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- The shiro socket bean
- Build api info
- Bean specific properties for Swagger annotations
- Jiro filter factory bean
- Returns a string representation of this property
- Retrieve a session
- Set session id
- Get the pool configuration
- Creates the pool configuration
- Update the subject
- Get current user
- Login
- Login with a user
- Initialize the shiro filter
- Returns the property value
- Default session manager
- Default security manager
- The Redis cache manager
- The HashedCredentials bean
- Registers the Shiro API
- Bean attributeSourceAdvisor
- Default shiro session DAO
- Redirect to no - access URL
- Logout session
- Builds host and port from list of nodes
- Bean configuration bean
shiro-spring-boot-starter Key Features
shiro-spring-boot-starter Examples and Code Snippets
spring:
redis:
database: 0
host: localhost
password: # Redis服务器若设置密码,此处必须配置
port: 6379
timeout: 10000 # 连接超时时间(毫秒)
pool:
max-active: 8 # 连接池最大连接数(使用负数表示没有限制)
max-idle: 8 # 连接池中的最大空闲连接
min-idle: 0 # 连接池中的最小
swagger:
title: 测试Demo
description: 测试Demo
version: 1.0.RELEASE
license: Apache License, Version 2.0
license-url: https://www.apache.org/licenses/LICENSE-2.0.html
terms-of-service-url: https://github.com/dyc87112/spring-boot-starter-swagg
security:
shiro:
filterPattern:
anon: # 不需要Shiro拦截的请求URL
- /api/v1/** # swagger接口文档
- /v2/api-docs
- /swagger-ui.html
- /webjars/**
- /swagger-resources/**
authc: # 需要Shiro拦截的请求URL
Community Discussions
Trending Discussions on shiro-spring-boot-starter
QUESTION
I am trying to integrate Spring Boot and Shiro. When I tried to call SecurityUtils.getSubject()
in one of my controllers, an exception occurred:
org.apache.shiro.UnavailableSecurityManagerException: No SecurityManager accessible to the calling code, either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton. This is an invalid application configuration.
I just followed some tutorials and docs to configure Shiro and here is my ShiroConfig
class:
ANSWER
Answered 2019-Jun-20 at 02:56Are you using the shiro-spring-boot-web-starter dependency instead of the shiro-spring-boot-starter dependency?
It looks like that is required for spring boot web applications according to this doc.
https://shiro.apache.org/spring-boot.html#Spring-WebApplications
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install shiro-spring-boot-starter
You can use shiro-spring-boot-starter like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the shiro-spring-boot-starter component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page