After connecting the spring-boot-starter-data-jpa
library, requests that are needed to initialize the application are blocked.
The console outputs the following and doesn't go anywhere else:
{"timestamp":"2025-01-30T19:09:27.309+03:00","level":"DEBUG","thread":"main","context":"default","message":"[2f5fb329] HTTP GET ;,"source":"org.springframework.web.reactive.function.client.ExchangeFunctions","application_name":"order-management","X-B3-TraceId":"679ba43657c761c850920b80eec8f134","X-B3-SpanId":"50920b80eec8f134"}
{"timestamp":"2025-01-30T19:09:29.672+03:00","level":"DEBUG","thread":"reactor-http-nio-2","context":"default","message":"[2f5fb329] [044fea2d-1, L:/192.168.111.130:52242 - R:apidocs.canavara-group.ru/19.14.155.134:443] Response 200 OK","source":"org.springframework.web.reactive.function.client.ExchangeFunctions","application_name":"order-management","X-B3-TraceId":"679ba43657c761c850920b80eec8f134","X-B3-SpanId":"50920b80eec8f134"}
This log triggers the following query:
public List<Filter> apiV2OrderManagementOrderFiltersGet() throws WebClientResponseException {
ParameterizedTypeReference<Filter> localVarReturnType = new ParameterizedTypeReference<Filter>() {};
return apiV2OrderManagementOrderFiltersGetRequestCreation().bodyToFlux(localVarReturnType).collectList().block();
}
If you run the application through the Intellij Idea functionality, then that's it; if you run the application through the mvn start-boot:run command, then everything is successful and works, but the fonts are broken. You also need a debugger to work, so it's advisable to understand what the problem is and fix it.
Connecting the database via application.properties
spring.datasource.url=jdbc:postgresql://localhost:5432/order_management
spring.datasource.username=order_management
spring.datasource.password=order_management
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect
spring.liquibase.change-log=classpath:/db/liquibase-changelog.xml
The problem is that the project needs spring boot jpa, which is available in the spring-boot-starter-data-jpa library, after connecting which the project stops running. The project most likely stops launching due to blocking the request, but this is not certain, due to the fact that everything is so unclear and the question was asked how to launch the application after adding spring-boot-starter-data-jpa, you may need to add some more dependencies, or configure spring somehow. application, I forgot to specify that java 17 is used
I tried adding asynchrony to these requests, but to get results, I still need to use block(), which stops the application. I also tried the spring-boot-starter-data-r2db asynchronous library, but with it the application gives an error that Repositories are not located I tried everything I found and everything that ChatGPT suggested, but there I didn't understand anything, so I decided to ask a question.