Tuesday, December 6, 2011

Cached Property File Enum

We had a little need to dynamically enable and disable features on our current project and I sorta left it for the last day, came up with a simple little solution that ended up quite neat.

A cached property file enum:


 How it looks being used:
Code:
Test:
The .properties file:
FEATUREA=true
FEATUREB=false
FEATUREC=true

How it works:

9 comments:

  1. Simple and elegant solution. Thanks for sharing!

    ReplyDelete
  2. Here's a challenge for you:

    Inject one of these reloaded properties into a spring application context... that's a mystery that I've tried to solve before with varying success (bob, bob, bob, bob etc).

    ReplyDelete
  3. Ok challenge accepted :) check my post:

    Spring 3: Scheduling, Components, PostBeanProcessors and bending the rules.
    (June last year)

    ReplyDelete
  4. Thanks for sharing this information with us. Property dealers can learn from your post about the cached file property. More, I am giving Furniture Moving Services in Stamford CT to the companies. They can changed office and send the furniture safe and sound to new office.

    ReplyDelete
  5. At Shopifyninja, we have a team of experts who know how to build dynamic experiences by creating a wide variety of shopify store development services with unique features

    ReplyDelete
  6. Mechanical Project in Coimbatore

    Mechanical Autocad Training

    Autocad Mechanical Course

    Autocad Online Course for Mechanical

    Autocad Course for Mechanical Engineering

    Cadd Center Courses for Mechanical

    Autocad for Mechanical Engineering Courses

    Mechanical Cad Training

    Cad Course for Mechanical Engineer

    Cadd Center Courses for Mechanical Fees

    ReplyDelete

Popular Posts

Followers