Me paso un error en mapper a la hora de ejecutar. Podria indicarme cual seria el error dejo la url de mi repo.(<a href="https://github.c...

Junior Veli

Junior Veli

Pregunta
studenthace 5 años

Me paso un error en mapper a la hora de ejecutar. Podria indicarme cual seria el error dejo la url de mi repo.(https://github.com/jveli/supermark.git)

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.

2020-10-29 17:54:02.785 ERROR 22704 — [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field mapper in com.supermark.persistence.ProductoRepository required a bean of type ‘com.supermark.persistence.mapper.ProductMapper’ that could not be found.

The injection point has the following annotations:

- @org.springframework.beans.factory.annotation.Autowired(required=true)

Action:

Consider defining a bean of type ‘com.supermark.persistence.mapper.ProductMapper’ in your configuration.

Process finished with exit code 1

5 respuestas
para escribir tu comentario
    Luis Márquez

    Luis Márquez

    studenthace 3 años

    Tenia el mismo error y lo pasaba es que en una anotacion Mapping me habia equivocado de nombre de atributo, habría puesto el nombre del atributo segun BBDD y lo tenia que poner segun clase Producto. Es decir, habia puesto mapping source = "id_producto" en lugar de "idProducto" Ese era mi error.

    Rolando Mamani Salas

    Rolando Mamani Salas

    studenthace 4 años

    yo tengo el mismo error

    Alejandro Ramírez

    Alejandro Ramírez

    teacherhace 4 años

    Así es, por favor verifica esos problemas que te comparto en la imagen (Están mal escritas las variables).

    Junior Veli

    Junior Veli

    studenthace 4 años

    Estoy utilizando intellij, me sale esto Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2020-11-27 17:47:21.532 ERROR 10744 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


    APPLICATION FAILED TO START


    Description:

    Field mapper in com.supermark.persistence.ProductoRepository required a bean of type 'com.supermark.persistence.mapper.ProductMapper' that could not be found.

    The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)

    Action:

    Consider defining a bean of type 'com.supermark.persistence.mapper.ProductMapper' in your configuration.

    Process finished with exit code 1

    Alejandro Ramírez

    Alejandro Ramírez

    teacherhace 5 años

    Qué IDE estás usando? En IntelliJ me muestra los errores que tienes apenas lanzo la aplicación:

    Captura de pantalla 2020-10-29 205954.jpg

Curso de Java Spring

Curso de Java Spring

Construye una API REST con Java Spring para gestionar productos en un supermercado. Aprende a mapear objetos, manejar bases de datos con Spring Data, y aplicar principios de desarrollo profesional. Expone y controla servicios usando Swagger y Heroku. Ideal para profundizar en el desarrollo de aplicaciones empresariales robustas y seguras.

Curso de Java Spring
Curso de Java Spring

Curso de Java Spring

Construye una API REST con Java Spring para gestionar productos en un supermercado. Aprende a mapear objetos, manejar bases de datos con Spring Data, y aplicar principios de desarrollo profesional. Expone y controla servicios usando Swagger y Heroku. Ideal para profundizar en el desarrollo de aplicaciones empresariales robustas y seguras.