Java Spring Boot deployment error
I have deployed my back-end, first it was java version 20, and i get error of unsuported version i changed it to 19, now i get errors regarding lombook anotation
example:
/app/src/main/java/org/example/Barter/BarterDTO.java:[34,25] cannot find symbol
#10 14.59 [ERROR] symbol: method builder()
#10 14.59 [ERROR] location: class org.example.Barter.BarterDTO
#10 14.59 [ERROR] /app/src/main/java/org/example/Barter/BarterDTO.java:[35,27] cannot find symbol
#10 14.59 [ERROR] symbol: method getId()
#10 14.59 [ERROR] location: variable barter of type org.example.Barter.Barter
#10 14.59 [ERROR] /app/src/main/java/org/example/Barter/BarterDTO.java:[36,63] cannot find symbol
#10 14.59 [ERROR] symbol: method getOfferedId()
20 Replies
Project ID:
N/A
N/A
Are you using Nixpacks or a custom Dockerfile?
Custom dockerfile:
Are you building your app in the Dockerfile or manually?
manually
Why?
I am new in docker and deployment it's my first time, so idk how to do it correctly, just what i see in youtube and documentation (
Can we get a call? if it's possible?
Please don't do that. Here's a Dockerfile that should work out of the box:
Also, you shouldn't be getting unsupported version errors with Java 20 - it's perfectly well supported.
one second
Oh, you're using Maven
yep
that's a whole 'nother can of bean-shaped worms
Would it be possible for you to use gradle?
i should refactor whole project 😭
I'm afraid I can't really help you if you're using maven, I don't know much about it and I don't really want to touch it
that is the problem with maven?
It's very slow and kind of outdated
You should be able to start a new Spring Boot project with either https://railway.app/template/Wm9zSM or Spring Initializr and then copy your source files in, and it should basically work
Using Gradle shouldn't really require code changes
Oh, nice thanks, i will still try to do it with maven, but next projects i will use gradle, thank you a lot
no problem