Ignoring versioned files with GIT

Suppose you work in a team. You download the project sources and you need to change some configurations according to your working environment, like the tcp port on which to run the webserver or the path where to store the log files. If you commit those files, after your local set up, this would impact […]

For the ones who don’t know what OWNER library is, you can read my previous article here: Introducing OWNER, a tiny framework for Java Properties files. It has been a long time since I posted the Part 1 of this article, and version 1.0.3 was just released. Now I should probably write about version 1.0.4 […]

In the last blog post I introduced what is the OWNER API and how to use it. Basically it is tiny library that helps reducing the Java code to read the configuration for your application from Java Properties files. You can find full documentation here. Version 1.0.0 was having the very basic features, and now I’m […]

I never liked to create “wrapper” classes for properties files. Do you know… those classes like: public class MyAppConfig { private static Properties p = …; public static String serverName() { return p.getProperty(“server.name”); } public static int serverPort() { return Integer.parseInt(p.getProperty(“server.port”)); } …. } There’s nothing really bad about those classes. Only that they don’t […]

Are you habit to have some configuration files packaged inside the jar of your application? If so, you can still have a look at those configuration files in the running environment using the unzip Unix utility. $ unzip -p /opt/myapp/lib/my-app.jar log4j.properties log4j.rootLogger=INFO,stdout log4j.appender.stdout=org.apache.log4j.ConsoleAppender log4j.appender.stdout.Threshold=INFO log4j.appender.stdout.layout=org.apache.log4j.PatternLayout log4j.appender.stdout.layout.ConversionPattern=%d{dd-MMM hh:mm} [%-5p] %m%n The -p option uncompress and prints […]

I've been using some proprietary frameworks and libraries, that are using Files objects, and only File objects, everywhere in the interfaces. It's not that is bad to have methods accepting File objects, but it's not wise to accept only that. For example the DOM/SAX XML parser in the JDK, accept File object but includes also […]


You are currently browsing the NewInstance weblog archives for configuration.

Longer entries are truncated. Click the headline of an entry to read it in its entirety.


September 2017
« Nov    

Follow me

twitter flickr LinkedIn feed

Subscribe by email

Enter your email address:



Tag Cloud