-
Notifications
You must be signed in to change notification settings - Fork 4
/
DemoApplication.java
32 lines (28 loc) · 984 Bytes
/
DemoApplication.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
/**
* Below is an example of using a PreparsedDocumentProvider.
* Uncomment to enable
*/
// @Configuration
// static class PreparsedDocumentProviderConfig {
//
// private final Cache<String, PreparsedDocumentEntry> cache = Caffeine.newBuilder().maximumSize(250)
// .expireAfterAccess(5, TimeUnit.MINUTES).recordStats().build();
//
//
// @Bean
// public PreparsedDocumentProvider preparsedDocumentProvider() {
// return (executionInput, parseAndValidateFunction) -> {
// Function<String, PreparsedDocumentEntry> mapCompute = key -> parseAndValidateFunction.apply(executionInput);
// return cache.get(executionInput.getQuery(), mapCompute);
// };
// }
// }
}