Archives mensuelles : février 2021

Python as command line tools

Format a JSON in shell : curl « http://myurl » | python -m json.tool Or : cat foo.json | python -m json.tool

Publié dans Non classé | Laisser un commentaire

Gradle

Basic tasks clean : delete the build directory build : build the application publish : publish the jar in the configured remote repository Important env variables GRADLE_OPTS : Specifies JVM arguments to use when starting the Gradle client VM. The … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Spring Cloud

Spring Boot version and Spring Cloud versions You cannot use any Spring Cloud version with any Spring Boot version.Table 1. Release train Spring Boot compatibilityRelease TrainRelease Train2022.0.x aka Kilburn3.0.x2021.0.x aka Jubilee2.6.x, 2.7.x (Starting with 2021.0.3)2020.0.x aka Ilford2.4.x, 2.5.x (Starting with 2020.0.3)Hoxton2.2.x, 2.3.x (Starting … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Python basics

Themes Namming styles Truthly and Falsy Loop Exception handling Python command line Shell Args Variables declaration Environment variables Execute shell process with subprocess module (Python 3.5) String String flavors String Declaration String formatting Functions Built-in functions print() function Function definition … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Redis with Spring Boot

Configuration Dependency <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-redis</artifactId> </dependency> Specify the redis instance host/port spring.redis.host=foohost spring.redis.port=6379 Enable Redis and set the configuration import java.util.Collections;   import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.data.redis.connection.RedisConnectionFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.convert.KeyspaceConfiguration; import org.springframework.data.redis.repository.configuration.EnableRedisRepositories; import org.springframework.data.redis.serializer.StringRedisSerializer;   @EnableRedisRepositories @Configuration public … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Redis Repository – Spring Boot

Redis with Spring-data repository allows to use complex model to persist/load out of the box while we don’t use complex object as map keys or map values that contain collection. Common structures for our examples pom.xml <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 … Continuer la lecture

Publié dans Non classé | Laisser un commentaire