Skip to content
Advertisement

SQL Grammar Exception in Spring Boot H2

I’v got a problem in my Spring Boot with H2 project. I got a get method for listing elements from the SQL table and the SQL command working. In the H2 database I can execute and see the results but I can’t get the values from Postman. My GET post went wrong. My SQL codes are also in here.

I also uploaded my project to github. If you want to see all classes Here is my GitHub project link

UrunEntity class

Here is my UrunRepository

Here is the error code at backend

Here is the error from Postman:

KullanicilarEntity class

My Resource(endpoints) interface

Advertisement

Answer

I create a new model class named HayvanDto and I created all of the UrunEntity entites inside of this.

After that, in my implementation class, I wrote this code.

Then it worked. Thanks for the answers.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement