Archives de l’auteur : davidhxxx

OAuth 2 and Spring Boot 2

The grant types/ flows First, we will describe some grant types and in the next point we will see how to implement them with Spring Boot 2 The implicit flow / The implicit grant Steps : 1) the client requests … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Spring Boot 2 actuator

pom.xml <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> application.properties By default, only health,info,metrics are enabled. To enable all others : management.endpoints.web.exposure.include=* Actuators /beans : Displays a complete list of all the Spring beans in your application. /cache : Exposes available caches. /configprops : … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Apache as reverse proxy (AJP module) with Spring Boot

AJP as reverse proxy without SSL In Spring Boot 2.1 (it should also work in some earlier versions), we can enable the AJP connector such as :  import org.apache.catalina.connector.Connector; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.server.WebServerFactoryCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Profile;   … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Apache 2.4 on Ubuntu

Foreword I precise 2.4 because major as well minor versions matter in Apache 2 configuration. If you don’t use Apache 2.4, don’t go further. The installation Apache 2 is in the default packages repositories of Ubuntu. So to install the default … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Jenkins

Modify the logging configuration Warn : Jenkins relies on java.util.logging. Beware of level to specify : https://docs.oracle.com/javase/7/docs/api/java/util/logging/Level.html For direct OS installations, modify the script that run jenkins to set a system property when the JVM is run : -Djava.util.logging.config.file=/var/jenkins_home/logging.properties For … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Ubuntu with HyperV

Enable fullscreen or custom screen size – documentation official …We need to set the EnableEnhancedSessionMode to true to enable xrdp.To rollback, set it to false. Read value of the EnableEnhancedSessionMode property : Get-VMHost | fl -Property EnableEnhancedSessionMode Get all properties of a … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

GitLab application

GitLab components Summarize – ngnix : web server in front of the UI application (serve static resources and proxy to unicorn). We could have multiple instances of it : for unicor and for the container registry – unicorn : the … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Java 1.5+ : Lock API : an alternative to the synchronized keyword

Plan Synchronized keyword limitations Locking on an Object field : the premises of the lock API ReentrantLock : the basic lock ReentrantLock versus synchronized statement benchmark A scenario example where ReentrantLock can help us Synchronized keyword limitations The java.util.concurrent.locks package from … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

network commands

Windows appsresmon.exe Display applications that binds a port Windows netstat -a -b -n -o | findstr 5005 Linux …. List applications Windows tasklist Linux ps -aux Kill an application Windows Taskkill /PID 9424 /F Linux kill …

Publié dans Non classé | Laisser un commentaire

Maven commands

Base Helpful Flags : -am,–also-make If project list is specified, also build projects required by the list -amd,–also-make-dependents If project list is specified, also build projects that depend on projects on the list -B,–batch-mode Run in non-interactive (batch) mode -D,–define … Continuer la lecture

Publié dans Non classé | Laisser un commentaire