This file contains 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
@Value("#{'${my-property}'.split(',')}") | |
private Collection<String> myCollection; |
This file contains 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
// Création de l'object mapper | |
ObjectMapper objectMapper = new ObjectMapper(); | |
// Ne pas générer les valeurs nulles | |
objectMapper.setSerializationInclusion(Include.NON_NULL); | |
// Ignore les attributs supplémentaires dans les flux JSON | |
objectMapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); | |
// Gestion des dates Java 8 (java.time.*) |
This file contains 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.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<configuration> | |
<includes> | |
<include>**/*Tests.java</include> | |
<include>**/*Test.java</include> | |
<include>**/Test*.java</include> | |
<include>**/TU*.java</include> | |
<include>**/TI*.java</include> |
This file contains 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
/** | |
* Link to the specification | |
* | |
* <dl> | |
* <dt>GIVEN</dt> | |
* <dd>xxxxxx</dd> | |
* <dd>yyyyyy</dd> | |
* <dt>WHEN</dt> | |
* <dd>service xxx is called</dd> | |
* <dt>THEN</dt> |
This file contains 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
upstream app_name_servers { | |
server 192.168.1.1:8080; | |
server 192.168.1.2:8080; | |
} | |
location / { | |
rewrite /(.*) /app_name/$1 break; | |
proxy_pass http://app_name_servers; | |
} |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>Pierre subscriptions in feedly Cloud</title> | |
</head> | |
<body> | |
<outline text="Maison" title="Maison"> | |
<outline type="rss" text="Jeedom – Le Blog" title="Jeedom – Le Blog" xmlUrl="https://blog.jeedom.com/feed/" htmlUrl="https://blog.jeedom.com"/> | |
</outline> |
This file contains 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
# Get the aliases and functions | |
if [ -f ~/.bashrc ]; then | |
. ~/.bashrc | |
fi |
This file contains 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
final Optional<Item> foundItem = myCollection.stream() | |
.filter(item -> item.isTheOneIWant()) | |
.reduce((a, b) -> { | |
throw new RuntimeException("More than item item found !"); | |
}); |
This file contains 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
# =================================================================== | |
# EXTRACT PART OF A STRING | |
# =================================================================== | |
typeset -r STRING='my_key="my_value"' | |
typeset -r SUBSTRING=$(echo "$STRING" | sed -rn 's/^.*my_key="(.+)".*$/\1/p') | |
echo "$SUBSTRING" | |
# my_value | |
# =================================================================== |
This file contains 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
# =================================================================== | |
# EXTRACT PARTS OF A STRING | |
# =================================================================== | |
typeset -r STRING='1.0.0-just-a-test' | |
# GET THE FIRST PART ONLY (=1.0.0) | |
echo "$STRING" | cut -d '-' -f1 | |
# GET THE LAST PART ONLY (=just-a-test) |
OlderNewer