All Projects → apache → geronimo-config

apache / geronimo-config

Licence: Apache-2.0 License
Apache Geronimo Config

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to geronimo-config

geronimo-specs
Mirror of Apache Geronimo specs
Stars: ✭ 20 (+33.33%)
Mutual labels:  web-framework, javaee, network-server, geronimo
geronimo
Mirror of Apache Geronimo
Stars: ✭ 35 (+133.33%)
Mutual labels:  web-framework, javaee, network-server, geronimo
Tomcat
Apache Tomcat
Stars: ✭ 5,756 (+38273.33%)
Mutual labels:  javaee, network-server
tomcat-training
Apache Tomcat Training Material
Stars: ✭ 15 (+0%)
Mutual labels:  javaee, network-server
tomcat-native
Mirror of Apache Tomcat Native
Stars: ✭ 73 (+386.67%)
Mutual labels:  javaee, network-server
ncms
Java CMS engine. Host and develop multiple websites inside a single instance through the GUI and benefit from features like A/B testing, affiliate tracking tools, and a high performance template engine with CSS stylesheets processing & scripts minification.
Stars: ✭ 32 (+113.33%)
Mutual labels:  web-framework, javaee
couchdb-couch-plugins
Mirror of Apache CouchDB
Stars: ✭ 14 (-6.67%)
Mutual labels:  network-server
mojo.js
🦄 The Mojolicious real-time web framework for Node.js
Stars: ✭ 145 (+866.67%)
Mutual labels:  web-framework
quinn
A set of convenient helpers to use promises to handle http requests
Stars: ✭ 40 (+166.67%)
Mutual labels:  web-framework
skinny-micro
🎤 Micro Web framework to build Servlet applications in Scala, the core part of Skinny Framework 2
Stars: ✭ 57 (+280%)
Mutual labels:  web-framework
bval
Mirror of Apache Bean Validation
Stars: ✭ 28 (+86.67%)
Mutual labels:  javaee
nardis
A small web framework based on ASGI
Stars: ✭ 14 (-6.67%)
Mutual labels:  web-framework
portals-pluto
Mirror of Apache Pluto
Stars: ✭ 24 (+60%)
Mutual labels:  web-framework
couchdb-mango
Mirror of Apache CouchDB Mango
Stars: ✭ 34 (+126.67%)
Mutual labels:  network-server
james-hupa
Apache James hupa
Stars: ✭ 20 (+33.33%)
Mutual labels:  network-server
openjpa
Apache OpenJPA
Stars: ✭ 99 (+560%)
Mutual labels:  javaee
cdi-events-playground
Demonstrates the capabilities of Java EE CDI events
Stars: ✭ 23 (+53.33%)
Mutual labels:  javaee
TendereteOnline
A Java EE web application of an Online Shop developed with Hibernate + Spring + Bootstrap + jQuery
Stars: ✭ 19 (+26.67%)
Mutual labels:  javaee
jakartaee-kubernetes
Effective Kubernetes for Java EE, Jakarta EE and MicroProfile Developers
Stars: ✭ 32 (+113.33%)
Mutual labels:  javaee
membership
Membership service (to demonstrate graphQL)
Stars: ✭ 19 (+26.67%)
Mutual labels:  javaee

Configuration for Java SE and EE

Status

Implementation of the MicroProfile Config Specification.

Rationale

Many project artifacts (e.g. WAR, EAR) should only be created once and then get installed at different customers, stages, etc They need to target those different execution environments without necessity of any repackaging. In other words: depending on the situation they need different configuration.

This is easily achievable by having a set of default configuration values inside the project artifact. But be able to overwrite those default values from external.

History

This very configuration approach has it’s roots in the Apache OpenWebBeans internal SPI configuration. In 2010 it got moved over to the Apache MyFaces CODI project and enhanced to also fit the need of customer projects by Gerhard Petracek and Mark Struberg. In 2011 we further enhanced it while moving CODI to the Apache DeltaSpike project. Romain Manni-Bucau (Apache/Tomitribe), Ron Smeral (JBoss) and Anatole Tresch also gave appreciated input in the last years.

How it works

A 'Configuration' consists of the information collected from the registered ConfigSource s. These `ConfigSource`s get sorted according to their ordinal. That way it is possible to overwrite configuration with lower importance from outside.

By default there are 3 default ConfigSources:

  • System.getenv() (ordinal=400)

  • System.getProperties() (ordinal=300)

  • all META-INF/microprofile-config.properties files on the ClassPath. (ordinal=100, separately configurable via a config_ordinal property inside each file)

That means that I can put my default configuration in a META-INF/microprofile-config.properties anywhere on the classpath. And I can later simply e.g set a system property to change this default configuration.

Custom ConfigSources

It is possible to write and register custom `ConfigSource`s. An example would be a ConfigSource which gets the configured values from a shared database table in a cluster.

Building

Against Apache OpenWebBeans 1.7.x: $> mvn clean install

Against Apache OpenWebBeans 2.0.x: $> mvn clean install -POWB2

Against JBoss Weld 3.0.x: $> mvn clean install -PWeld3

Adding to your project

To add Geronimo Config to your project, just add the following dependency.

<dependency>
    <groupId>org.apache.geronimo.config</groupId>
    <artifactId>geronimo-config-impl</artifactId>
    <version>1.0</version>
</dependency>

Config API

Geronimo Config implements The MicroProfile Config API v1.1 and further information can be found at

The API is also available as Maven Artifact, which you could use if provided by your container

<dependency>
    <groupId>org.eclipse.microprofile.config</groupId>
    <artifactId>microprofile-config-api</artifactId>
    <version>1.1</version>
    <scope>provided</scope>
</dependency>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].