Giter Site home page Giter Site logo

Comments (11)

Smith-Cruise avatar Smith-Cruise commented on May 20, 2024

能看看你UserService 第20行左右的代码吗

from spring-boot-shiro.

liliangbin avatar liliangbin commented on May 20, 2024

恩 那个在这里
img

from spring-boot-shiro.

Smith-Cruise avatar Smith-Cruise commented on May 20, 2024

这个就是空指针嘛,要么你findname根本没有没有拿到东西,返回了null。要么你userDao为空,没有注入进去,自己进行排查吧

from spring-boot-shiro.

liliangbin avatar liliangbin commented on May 20, 2024

我试试

from spring-boot-shiro.

liliangbin avatar liliangbin commented on May 20, 2024

大神,就是根据你的提示我去排查了一下 findname()那个方法,做 了几个测试应该是没有问题的,userDao哪里是可以拿到数据的。但是还是会出现null空指针的问题。

: Authentication failed for token submission [com.example.demo.shiro.JWTToken@635744c8].  Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).

java.lang.NullPointerException: null

你可以帮我看一下是哪里出了问题么。
shrio.zip

from spring-boot-shiro.

Smith-Cruise avatar Smith-Cruise commented on May 20, 2024

这种问题还是靠自己吧,我也没时间( • ̀ω•́ )✧

from spring-boot-shiro.

liliangbin avatar liliangbin commented on May 20, 2024

嗯呢,感觉自己对jwt哪里还有点问题。我再看看,谢谢大佬给的思路。

from spring-boot-shiro.

Smith-Cruise avatar Smith-Cruise commented on May 20, 2024

好吧,对不住了

from spring-boot-shiro.

cheesekun avatar cheesekun commented on May 20, 2024

@liliangbin 请问你解决了吗,我今天花了一天,跟你一样的错误。头发快没了

from spring-boot-shiro.

liliangbin avatar liliangbin commented on May 20, 2024

emmm,那个我也是不知道出在哪里问题,但是我后来就根据楼主的思路,我就自己重新写了一个过滤器,然后自己把那个jwt 和shiro结合起来。就可以了。我把我写好的那个例子发给你看看吧。
https://github.com/liliangbin/spring-boot-jwt //这个是最开始做的那个测试用写的是能够用的
https://github.com/OpenDiningHall/Open-Dining-Hall //这个是根据那个测试后,然后写的一个小样例,

我的代码水平不是很高,也还没有多少时间来好好的修修一些小毛病。先看着吧。有事你再问我

from spring-boot-shiro.

cheesekun avatar cheesekun commented on May 20, 2024

@liliangbin
我刚刚找到解决方法了。超级开心。
http://blog.csdn.net/u011961421/article/details/78803998
感谢你的回复。你可以去看看,可以解决问题。

from spring-boot-shiro.

Related Issues (20)

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.