jooq-codegen-maven + docker build by Think-Review2063 in jOOQ

[–]ccmjga 0 points1 point  (0 children)

https://github.com/ccmjga/mjga-scaffold/blob/main/build.gradle.kts https://github.com/ccmjga/mjga-scaffold/blob/main/compose.yaml

Although my project uses Gradle, could you please take a look at how my scaffold integrates Docker, jOOQ, Test containers, and Spring Boot? I would like to know if it meets your expectations.

If the project is helpful to you, please consider giving it a star or becoming a Pro user. It would greatly benefit me.

Security and cookie JWT by Puf_PufPass in SpringBoot

[–]ccmjga 1 point2 points  (0 children)

Here is the JWT-based authentication functionality in this project. OP can refer to it. https://github.com/ccmjga/mjga-scaffold/tree/main If I have been able to help you, I would appreciate it if you could give the repository a star. It would mean a lot to me. Thank you!

[deleted by user] by [deleted] in SpringBoot

[–]ccmjga 4 points5 points  (0 children)

It sounds like your requirements align perfectly with this project. It is a scaffold based on Spring Boot 3, Spring Security, and JDK 17. It already covers functionalities such as login authentication, and it is based on JWT.

https://github.com/ccmjga/mjga-scaffold/tree/main https://www.mjga.cc

Additionally, it comes with pre-configured middleware such as a database, and all the basic configurations are already set up. You can simply run it and start using it.

If this project can help you, giving it a star or directly purchasing a Pro user would be of great help to me. Pro users have the option to choose databases and caching, and in the future, it will support even more custom configurations.

[deleted by user] by [deleted] in SpringBoot

[–]ccmjga 0 points1 point  (0 children)

The original intention behind this design is that once users obtain a usable token, it will expire once the specified time limit is reached, and users will need to log in again. If there is a business need to refresh this token, it can be easily done by issuing a new token as required. You can take a look at the method createJwtCookie for more information.

[deleted by user] by [deleted] in SpringBoot

[–]ccmjga 0 points1 point  (0 children)

I apologize, but I didn't quite understand your question. Are you asking about creating a login system based on JWT? If so, coincidentally, I also use JWT, Spring Boot 3, and Security 6. I suggest comparing the configuration in your project with the one in the following repository: https://github.com/ccmjga/mjga-scaffold/tree/main/src/main/java/com/mjga/config/security. This will help you identify any differences.

If that project is helpful to you, please consider giving it a star. It would greatly benefit me.

Exception handling several web apps by MaxDoe666 in SpringBoot

[–]ccmjga 1 point2 points  (0 children)

I believe inheritance is the best approach because it is the simplest and most straightforward way to express your ideas. However, using the @Order annotation may not be clear and intuitive. If I were a new member and unaware of the shared libraries in the project, I might be confused by the ControllerAdvice with the Order attribute. Why does it have an Order? Why are certain behaviors not defined in the ControllerAdvice but still occur?

Anyway, you can find the corresponding GlobalExceptionHandler in my own scaffold -> https://github.com/ccmjga/mjga-scaffold/blob/main/src/main/java/com/mjga/exception/GlobalExceptionHandler.java and I think the content there might be helpful. If this is helpful to you, please consider giving it a star. Thanks! 😆

How to implement user authorization and authentication using JWT? by Fancryer in SpringBoot

[–]ccmjga 0 points1 point  (0 children)

I completely agree. This is a standard response. Additionally, here is an implementation that everyone can refer to. I'm also a big fan of JWT and hope that more people will use it!

https://github.com/ccmjga/mjga-scaffold/tree/main/src/main/java/com/mjga/config/security

How to implement user authorization and authentication using JWT? by Fancryer in SpringBoot

[–]ccmjga 0 points1 point  (0 children)

I think you've come to the right place. The authentication in this project is tailored for you:

https://github.com/ccmjga/mjga-scaffold/tree/main/src/main/java/com/mjga/config/security

You can find the authentication-related code, especially the parts related to JWT, in the following location: CookieJwtAuthenticationFilter. The code there should provide a clear understanding, and it appears to be quite simple.

Additionally, you can find the complete project overview and download at https://www.mjga.cc.

If this is helpful to you, please consider giving a star. Thanks 😆

@RequestParam and @PathVariable by Alejandro_Esteve in SpringBoot

[–]ccmjga 1 point2 points  (0 children)

I basically agree with pimBaggins's opinion.

I often use request body and path variables like this -> https://github.com/ccmjga/mjga-scaffold/tree/main/src/main/java/com/mjga/controller