Code Monkey home page Code Monkey logo

shiro-spring-boot-example's Introduction

Apache Shiro Spring-Boot Example

This example can be run using the Apache Maven command: mvn spring-boot:run

Then browse or use cURL to: http://localhost:8080/troopers

curl --user emperor:secret http://localhost:8080/troopers

Deploy

shiro-spring-boot-example's People

Contributors

bdemers avatar

Stargazers

Jonas avatar  avatar  avatar Zhao Xiaohong avatar 招文桃 avatar Prafull Kotecha avatar  avatar Sangkyun Yoon avatar Barry avatar Ben avatar  avatar  avatar  avatar  avatar VirtualAdrian avatar Park Sang kil avatar Ganeshan Venkataraman avatar Jeff avatar moxm.com avatar csyangchsh avatar

Watchers

 avatar Les Hazlewood avatar  avatar James Cloos avatar Alex Salazar avatar  avatar  avatar  avatar

shiro-spring-boot-example's Issues

Example can only work til 1.4.5

Thanks for the great example

Upon changing to

<spring-boot.version>1.4.6.RELEASE</spring-boot.version>

the following error occurs:

Caused by: java.lang.NoSuchMethodError: org.springframework.aop.framework.AopProxyUtils.getSingletonTarget(Ljava/lang/Object;)Ljava/lang/Object;
        at org.springframework.context.event.AbstractApplicationEventMulticaster.addApplicationListener(AbstractApplicationEventMulticaster.java:105)

How to use custom ControlFilter in shiro-spring-boot?

my code

@Configuration
@AutoConfigureBefore(ShiroWebFilterConfiguration.class)
public class ShiroConfiguration {

  @Bean
  public CustomControlFilter customControlFilter() {
    return new CustomControlFilter();
  }

  @Bean
  public ShiroFilterChainDefinition shiroFilterChainDefinition() {
      DefaultShiroFilterChainDefinition chainDefinition = new DefaultShiroFilterChainDefinition();
      // use permissive to NOT require authentication, our controller Annotations will decide that
      chainDefinition.addPathDefinition("/**", "customControlFilter");
      return chainDefinition;
    }
}

Exception:
Caused by: java.lang.IllegalArgumentException: There is no filter with name 'customControlFilter' to apply to chain [/**] in the pool of available Filters. Ensure a filter with that name/path has first been registered with the addFilter method(s).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.