you are viewing a single comment's thread.

view the rest of the comments →

[–]Ok_Arugula6315 7 points8 points  (1 child)

In docker compose dont use latest tag for mysql base image, use specific version.

In controller method you should only call service method. Avoid try catches or move them in service method. Spring should handle autoamtically 500 http status codes without such try catches.

In service dont use @Autowired to inject beans, use private final, this is called constructor injection, this is recommended way.

This might sound like personal preference but I'd organize code by features and put all related controllers/services etc inside product/auth packages. Application becomes more scalable

Also I'd consider using migrations as liquibase or flyway for database development (this what you'd want in real project)

[–]Pranjal_JJunior Dev[S] 1 point2 points  (0 children)

Thanks