adding Marker to parse effectively pdf

This commit is contained in:
Adrien
2026-04-04 21:30:18 +02:00
parent b154e29f2d
commit ea1276dc2e
25 changed files with 2318 additions and 285 deletions
@@ -0,0 +1,30 @@
package com.aiteacher.config;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.client.JdkClientHttpRequestFactory;
import org.springframework.web.client.RestClient;
import java.net.http.HttpClient;
@Configuration
public class MarkerConfig {
@Value("${app.marker.base-url:http://localhost:8000}")
private String markerBaseUrl;
@Bean
RestClient markerRestClient() {
// Use the JDK HTTP client with no timeout — Marker conversions can take several minutes.
HttpClient httpClient = HttpClient.newBuilder()
.build();
JdkClientHttpRequestFactory factory = new JdkClientHttpRequestFactory(httpClient);
// No read timeout set: JDK HTTP client defaults to no deadline.
return RestClient.builder()
.baseUrl(markerBaseUrl)
.requestFactory(factory)
.build();
}
}