If we do not want to hard-code values into our source code, we can use properties files. With theRead more…
@Valueannotation, Spring gives us an easy means to get properties from properties files and inject them into our code.
Let’s have a look at how to inject beans using setters with a custom method name.Read more…
If you have to work with legacy Spring applications, chances are you will have to know how XML-based configuration works. Although Java configuration is preferred for new applications, sometimes you just don’t have a choice, so you’d better be comfortable with it.Read more…
private List<String> strings;
When the cursor is on theRead more…
List<String>and start insert. Obviously, you can use any other command with that movement, for example yank the text (
yiW) or delete it (
For new projects, Java configuration is preferred over XML-based configuration. In this post, we’re going to look at how to configure Spring with configuration in Java, instead of the traditional XML.Read more…
If you have installedRead more…
moreutils(see below), you can type
vidirto open up the current working directory in your
$EDITOR. You can use all the power of your editor to edit and/or delete filenames and directories. Editing a line will rename the file or directory, deleting a line will remove the file or directory.
How can remove most of the files in a directory in Bash?Read more…
tomcat7-maven-pluginto spin up a Tomcat 7 container where I can run my web application. When I added dependencies for log4j2 (version 2.11.0) to my project, I got the error:
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
log4j2is a multi-release jar and older versions of Tomcat can’t handle that. So I needed to upgrade my Tomcat maven plugin.
Ever wanted to test whether a log statement is triggered? Or whether the format is the way you want? In this post, we’re going to create a custom log appender so we can be sure logging is behaving the way we expect.Read more…