Skip to content

Instantly share code, notes, and snippets.

@ludo1026
ludo1026 / gist:31b13fff00a6caf85fa0f7775a016fb8
Created February 13, 2023 14:12
Spring Boot : activate logs on http requests
-Dlogging.level.org.springframework.web=TRACE -Dspring.http.log-request-details=true
@ludo1026
ludo1026 / Vagrantfile
Last active March 31, 2017 16:55
Vagrant - docker
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", ip: "192.168.32.10"
config.vm.synced_folder "docker", "/home/vagrant/docker"
config.vm.provider "virtualbox" do |vb|
vb.memory = "1536"
end
config.vm.provision "docker"
config.vm.provision "shell", inline: <<-SHELL
docker --version
@ludo1026
ludo1026 / ApplicationWebXml.java
Created June 9, 2015 09:44
Spring Boot & Tomcat - War - ApplicationWebXML.java
package com.myimmo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import com.myimmo.config.Constants;
/**
* This is a helper Java class that provides an alternative to creating a web.xml.
@ludo1026
ludo1026 / pom.xml
Created May 29, 2015 17:09
Maven & Yeoman - War - Application Java classique - pom.xml
<profiles>
<profile>
<id>prod</id>
<build>
<plugins>
<plugin>
<groupid>com.github.trecloux</groupid>
<artifactid>yeoman-maven-plugin</artifactid>
<version>0.4</version>
@ludo1026
ludo1026 / CORSFilter.java
Last active August 29, 2015 14:22
Maven & Yeoman - CORS
package org.demo.filter;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
@Component
@ludo1026
ludo1026 / pom.xml
Created May 29, 2015 15:55
Maven & Yeoman - ressources - profile production
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${project.basedir}/yo/dist</directory>
</resource>
</resources>
@ludo1026
ludo1026 / pom.xml
Last active August 29, 2015 14:22
Maven & Yeoman - Profile Dev
<profiles>
<profile>
<id>dev</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
@ludo1026
ludo1026 / pom.xml
Created May 29, 2015 12:52
Maven & Yeoman - pom.xml - War
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<webResources>
<resource>
<directory>yo/dist/public</directory>
</resource>
</webResources>
</configuration>
@ludo1026
ludo1026 / pom.xml
Last active August 29, 2015 14:22
Maven & Yeoman - pom.xml - Profile Production
<profiles>
<profile>
<id>prod</id>
<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<resource>
@ludo1026
ludo1026 / yeoman-maven-plugin.xml
Created May 29, 2015 12:31
Maven & Yeoman - pom.xml - plugin yeoman-maven-plugin
<plugin>
<groupid>com.github.trecloux</groupid>
<artifactid>yeoman-maven-plugin</artifactid>
<version>0.4</version>
<executions>
<execution>
<id>run-frontend-build</id>
<phase>generate-resources</phase>
<goals>
<goal>build</goal>