Archives mensuelles : janvier 2021

Spring Boot and Tests

Personal note : I wrote multiple posts on Stackoverflow about  Spring Boot and Tests.  For example that answer about difference between @Mock and @MockBean  or still that question-answer on the general approach to test ours components with Spring Boot. But from … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Mongodb

Mongo shell mongo : executable. Flags : –eval « javascript code » Mongo shell commands Switch db: use foodb Find all elements in default collection : db.myCollection.find() Command mixing linux shell and mongo shell to insert : for v in $(seq 1 … Continuer la lecture

Publié dans Non classé | Laisser un commentaire

Spring Boot hints

Run a spring boot app : Spring boot app via maven : the base command It specifies the spring boot profile and it enables the remote debug : mvn spring-boot:run -Dspring-boot.run.jvmArguments= »-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000″ -Dspring-boot.run.profiles=local Pass spring properties and application args to … Continuer la lecture

Publié dans Non classé | Laisser un commentaire