Boa tarde #AluraTeam
Estou estudando a parte de apis com integração ao banco de dados, e ao criar minha api do zero, estou tendo este erro ao tentar chamar meu endpoint de cadastro.
Podem me ajudar?
Segue o repositorio = https://github.com/fahpsouza/cooffebreak
http://localhost:8081/cadastrar-produto
{ "nome": "Pao de Queijo", "tipoProduto": "Comida", "valor": 8.80 }
2024-05-07T09:25:56.380-03:00 INFO 4400 --- [ restartedMain] org.flywaydb.core.FlywayExecutor : Database: jdbc:mysql://localhost/coofeebreak (MySQL 8.0)
2024-05-07T09:25:56.408-03:00 INFO 4400 --- [ restartedMain] o.f.core.internal.command.DbValidate : Successfully validated 0 migrations (execution time 00:00.010s)
2024-05-07T09:25:56.408-03:00 WARN 4400 --- [ restartedMain] o.f.core.internal.command.DbValidate : No migrations found. Are your locations set up correctly?
2024-05-07T09:25:56.419-03:00 INFO 4400 --- [ restartedMain] o.f.core.internal.command.DbMigrate : Current version of schema `coofeebreak`: << Empty Schema >>
2024-05-07T09:25:56.421-03:00 INFO 4400 --- [ restartedMain] o.f.core.internal.command.DbMigrate : Schema `coofeebreak` is up to date. No migration necessary.
2024-05-07T09:25:56.493-03:00 INFO 4400 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]
2024-05-07T09:25:56.560-03:00 INFO 4400 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.4.4.Final
2024-05-07T09:25:56.605-03:00 INFO 4400 --- [ restartedMain] o.h.c.internal.RegionFactoryInitiator : HHH000026: Second-level cache disabled
2024-05-07T09:25:56.796-03:00 INFO 4400 --- [ restartedMain] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer
2024-05-07T09:25:57.487-03:00 INFO 4400 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000489: No JTA platform available (set 'hibernate.transaction.jta.platform' to enable JTA platform integration)
2024-05-07T09:25:57.489-03:00 INFO 4400 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-05-07T09:25:57.755-03:00 WARN 4400 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2024-05-07T09:25:58.038-03:00 INFO 4400 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2024-05-07T09:25:58.069-03:00 INFO 4400 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8081 (http) with context path ''
2024-05-07T09:25:58.076-03:00 INFO 4400 --- [ restartedMain] b.com.loja.cooffebreak.LojaApplication : Started LojaApplication in 3.57 seconds (process running for 4.121)
2024-05-07T09:26:10.176-03:00 INFO 4400 --- [nio-8081-exec-4] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2024-05-07T09:26:10.176-03:00 INFO 4400 --- [nio-8081-exec-4] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2024-05-07T09:26:10.177-03:00 INFO 4400 --- [nio-8081-exec-4] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
2024-05-07T09:26:10.458-03:00 WARN 4400 --- [nio-8081-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 1146, SQLState: 42S02
2024-05-07T09:26:10.458-03:00 ERROR 4400 --- [nio-8081-exec-4] o.h.engine.jdbc.spi.SqlExceptionHelper : Table 'coofeebreak.produtos' doesn't exist
2024-05-07T09:26:10.470-03:00 ERROR 4400 --- [nio-8081-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.transaction.UnexpectedRollbackException: Transaction silently rolled back because it has been marked as rollback-only] with root cause
org.springframework.transaction.UnexpectedRollbackException: Transaction silently rolled back because it has been marked as rollback-only
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:803) ~[spring-tx-6.1.6.jar:6.1.6]
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:757) ~[spring-tx-6.1.6.jar:6.1.6]
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:676) ~[spring-tx-6.1.6.jar:6.1.6]
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:426) ~[spring-tx-6.1.6.jar:6.1.6]