downgrade to java 8 and spring boot 2
This commit is contained in:
parent
e1560c7d58
commit
aab4ee8ef7
6
pom.xml
6
pom.xml
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
@ -6,7 +6,7 @@
|
|||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>3.2.5</version>
|
||||
<version>2.7.18</version>
|
||||
<relativePath /> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>eu.dnetlib</groupId>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<name>dnet-oai-server</name>
|
||||
<description>Simple OAI-PMH server</description>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<java.version>1.8</java.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
|
|
|
@ -8,6 +8,9 @@ import java.util.Iterator;
|
|||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.apache.commons.io.IOUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.logging.Log;
|
||||
|
@ -31,8 +34,6 @@ import eu.dnetlib.apps.oai.domain.OaiSet;
|
|||
import eu.dnetlib.apps.oai.domain.OaiVerb;
|
||||
import eu.dnetlib.apps.oai.domain.ResumptionToken;
|
||||
import eu.dnetlib.apps.oai.utils.DateUtils;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
|
||||
@Controller
|
||||
public class OaiServerController {
|
||||
|
@ -73,15 +74,22 @@ public class OaiServerController {
|
|||
|
||||
final String verb = params.remove("verb");
|
||||
|
||||
return switch (OaiVerb.validate(verb)) {
|
||||
case IDENTIFY -> oaiIdentify(params);
|
||||
case LIST_METADATA_FORMATS -> oaiListMetadataFormats(params);
|
||||
case LIST_SETS -> oaiListSets(params);
|
||||
case GET_RECORD -> oaiGetRecord(params);
|
||||
case LIST_IDENTIFIERS -> oaiListIdentifiers(params);
|
||||
case LIST_RECORDS -> oaiListRecords(params);
|
||||
default -> prepareErrorResponseXml(OaiError.badVerb);
|
||||
};
|
||||
switch (OaiVerb.validate(verb)) {
|
||||
case IDENTIFY:
|
||||
return oaiIdentify(params);
|
||||
case LIST_METADATA_FORMATS:
|
||||
return oaiListMetadataFormats(params);
|
||||
case LIST_SETS:
|
||||
return oaiListSets(params);
|
||||
case GET_RECORD:
|
||||
return oaiGetRecord(params);
|
||||
case LIST_IDENTIFIERS:
|
||||
return oaiListIdentifiers(params);
|
||||
case LIST_RECORDS:
|
||||
return oaiListRecords(params);
|
||||
default:
|
||||
return prepareErrorResponseXml(OaiError.badVerb);
|
||||
}
|
||||
}
|
||||
|
||||
private String oaiIdentify(final Map<String, String> params) {
|
||||
|
|
|
@ -7,11 +7,10 @@ import java.time.LocalDate;
|
|||
import java.time.LocalDateTime;
|
||||
import java.time.ZoneId;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import io.micrometer.common.util.StringUtils;
|
||||
|
||||
public class DateUtilsTest {
|
||||
|
||||
@BeforeEach
|
||||
|
|
Loading…
Reference in New Issue