Skip to content
Advertisement

NullPointerException on JPA on SpringBoot

I’m new on SpringBoot and I’m making a small CRUD. When I try to make a GET request that show me a list of soccer teams from my BD called “soccer” I’ve have the following error message:

JavaScript

My model “Equipo” is:

JavaScript

My Repositorie “EquipoRepo” is

JavaScript

My service “EquipoServicio” is:

JavaScript

And my REST class called “EquipoREST” is:

JavaScript

Advertisement

Answer

Try to add @Autowired annotation in EquipoServicio.

JavaScript
Advertisement