This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Timer timer = Timer.builder("timerName") | |
.publishPercentiles(0.5, 0.95, 0.99) | |
.tag("tag1", "sdgawehwh") | |
.register(meterRegistry); | |
return timer.record(() -> httpClient.call(body)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Serialize a collection of custom objects. The properties should be "string compatible". | |
* | |
* @param list collection to serialize. | |
* @param clazz type of the the collection. | |
* @return collection serialized in string. | |
*/ | |
public static <T> String serializeCustomObjectsCollection(Collection<T> list, Class<T> clazz) { | |
return Optional.ofNullable(list) | |
.map(listValue -> listValue.stream() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
URL localFileUrl = Thread.currentThread() | |
.getContextClassLoader() | |
.getResource("subFolder/" + "fileName.txt"); | |
File file = new File(localFileUrl.getPath()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpHeaders httpHeaders = new HttpHeaders(); | |
httpHeaders.setLocation( | |
ServletUriComponentsBuilder | |
.fromCurrentRequest() | |
.path("/{id}") | |
.buildAndExpand(entity.getId()) | |
.toUri()); | |
return new ResponseEntity<>(httpHeaders, HttpStatus.CREATED); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
public void test$EXPR$() { | |
$END$ | |
fail("Not yet implemented"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<plugin> | |
<groupId>org.jacoco</groupId> | |
<artifactId>jacoco-maven-plugin</artifactId> | |
<version>${jacoco.mavenplugin.version}</version> | |
<configuration> | |
<excludes> | |
<exclude>**/com/edwise/completespring/config/*</exclude> | |
</excludes> | |
</configuration> |