jwtk / jjwt

Java JWT: JSON Web Token for Java and Android
Apache License 2.0
10.28k stars 1.33k forks source link

Unable to load class named [io.jsonwebtoken.impl.DefaultJwtBuilder] #973

Closed ALittleHammer2 closed 5 days ago

ALittleHammer2 commented 6 days ago

version:0.12.6 maven: image image when i log in: image image method createToken: image

bdemers commented 6 days ago

Thanks for reporting this issue @ALittleHammer2

These types of issues are hard to track down without information about how your application is packaged (and potentially deployed). For example, if you are building a shaded/shadow jar, or if you deploy your application's dependencies across multiple classloaders (e.g. if parts of JJWT were loaded in different classloaders)

Can you provide a simple application that can reproduce this issue?? (or possibly describe how you are packaging/deploying your application)?

ALittleHammer2 commented 5 days ago

This happened when I used IDEA to launch the service directly My project structure and there is only one springboot Boot class in 'admin' module: image All the modules below depend on the top total module, then the second layer is the 'framwork' module, the third layer is the 'common' module, most of the other modules depend on 'commons', the fifth layer is the 'admin' module, all the controllers are in the 'admin' module 1729558380157 Here are some of my maven dependencies: spring boot version is 3.3.4 image

ALittleHammer2 commented 5 days ago

i should import jar in 'common'/pom.xml when i do it worked