pom.xml environment variable with default fallback

I wasn’t really satisfied with the accepted approach, so I simplified it a little. Basically set a default property in the normal properties block, and only override when appropriate (instead of an effective switch statement): <properties> <!– Sane default –> <buildNumber>0</buildNumber> <!– the other props you use –> </properties> <profiles> <profile> <id>ci</id> <activation> <property> <name>env.buildNumber</name> … Read more

Maven SLF4J: Class path contains multiple SLF4J bindings

Run mvn dependency:tree and search which dependency have the slf4j implementations you do not want, then exclude them with a dependency exclusion like: <dependency> <groupId>org.someexternallib</groupId> <artifactId>someexternallibartifact</artifactId> <version>…</version> <exclusions> <exclusion> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> </exclusion> <exclusion> <groupId>log4j</groupId> <artifactId>log4j</artifactId> </exclusion> </exclusions> </dependency>

By default, where does Spring Boot expect views to be stored?

The Solution I found the answer via trial-and-error, which turned out rather annoying. I hope someone can correct me if this conclusion is wrong, but it appears that Spring Boot does not like the string WEB-INF. I renamed the WEB-INF directory to view and changed the application.properties to the following and the view loaded successfully. … Read more

Minimize an Uber Jar correctly, Using Shade-Plugin

This functionality has been added to version 1.6 of the maven-shade-plugin (just released). minimizeJar will now not remove classes that have been specifically included with filters. Note that including some of an artifact’s classes in a filter will exclude non-specified classes for that artifact, so be sure to include all the classes that you need. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)