Java configuration supporting multiple deployment environments