migration fixes

This commit is contained in:
Efstratios Giannopoulos 2024-04-05 11:35:37 +03:00
parent 0d3e72028f
commit c35fb3ad3c
3 changed files with 18 additions and 5 deletions

View File

@ -10,11 +10,12 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.2</version>
<version>3.2.4</version>
</parent>
<modules>
<module>queryable</module>
<module>../dmp-backend/core</module>
<module>web</module>
<module>data</module>
<module>elastic</module>
@ -301,16 +302,26 @@
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>3.1.2</version>
</dependency>
<!--CITE DEPENDENCIES-->
<dependency>
<groupId>gr.cite</groupId>
<artifactId>data-tools</artifactId>
<version>2.1.0</version>
<version>2.1.2</version>
</dependency>
<dependency>
<groupId>gr.cite</groupId>
<artifactId>exceptions</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>gr.cite</groupId>
<artifactId>oidc-authz</artifactId>
<version>2.1.0</version>
</dependency>

View File

@ -387,7 +387,8 @@ public class RemoteFetcher {
JsonNode jsonBody = new ObjectMapper().readTree(replacedBody);
entity = new HttpEntity<>(jsonBody, headers);
response = restTemplate.exchange(replacedPath, HttpMethod.resolve(requestType), entity, String.class);
// response = restTemplate.exchange(replacedPath, HttpMethod.resolve(requestType), entity, String.class);
response = null;
if (response.getStatusCode() == HttpStatus.OK) {
if (response.getHeaders().get("Content-Type").get(0).contains("json")) {
DocumentContext jsonContext = JsonPath.parse(response.getBody());
@ -423,7 +424,8 @@ public class RemoteFetcher {
JsonNode jsonBody = new ObjectMapper().readTree(requestBody);
entity = new HttpEntity<>(jsonBody, headers);
response = restTemplate.exchange(urlString, HttpMethod.resolve(requestType), entity, String.class);
// response = restTemplate.exchange(urlString, HttpMethod.resolve(requestType), entity, String.class);
response = null;
if (response.getStatusCode() == HttpStatus.OK) { // success
//do here all the parsing
Results results = new Results();

View File

@ -25,6 +25,7 @@ import gr.cite.tools.data.query.QueryFactory;
import gr.cite.tools.exception.MyApplicationException;
import gr.cite.tools.logging.LoggerService;
import jakarta.persistence.EntityManager;
import jakarta.ws.rs.NotSupportedException;
import jakarta.xml.bind.JAXBException;
import org.jetbrains.annotations.NotNull;
import org.slf4j.LoggerFactory;
@ -34,7 +35,6 @@ import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import javax.management.InvalidApplicationException;
import javax.ws.rs.NotSupportedException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import java.io.IOException;