Skip to content

Instantly share code, notes, and snippets.

@lalyos
Created December 8, 2013 14:41
Show Gist options
  • Save lalyos/7858427 to your computer and use it in GitHub Desktop.
Save lalyos/7858427 to your computer and use it in GitHub Desktop.
slide test

class:midle

Environment Configuration

with zero EL


first page

running the same java process in different environments

dev

java -jar app.jar -Dmsg=hello-dev

prod

MSG='Hello PROD'
java -jar app.jar

class: middle

Spring Environment

<beans>
  <context:property-placeholder />
</beans>
public class MyComponent {
  @Autowired
  private Environment env;

  public void someMethod() {
    System.out.println(env.getProperty("msg"));
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment