/shiro-redis-spring-tutorial

In this tutorial, you see how to configure shiro-redis in spring framework

Primary LanguageJava

shiro-redis-spring-tutorial

In this tutorial, you see how to configure shiro-redis in spring framework

How to use it?

  1. Use the following comment to clone shiro-redis-spring-tutorial to your disk:
git clone https://github.com/alexxiyang/shiro-redis-spring-tutorial.git
  1. Modify redis service connection configuration in src/main/resources/applicationContext.xml
<bean id="redisManager" class="org.crazycake.shiro.RedisManager">
        <property name="host" value="127.0.0.1:6379"/>
</bean>
  1. Run jetty
mvn jetty:run
  1. Visit http://localhost:8080, you will see login page:

login page

  1. Use the username and password wrote on login page to sign in. Then you will see the successful page:

login success

  1. Use redis client to check redis data. For example, use Redis Desktop Manager:

redis data

It means shiro use redis as its session and cache solution successfully.

If you found any problems

Please send email to alexxiyang@gmail.com

可以用中文