All Projects → racc → Typesafeconfig Guice

racc / Typesafeconfig Guice

Licence: apache-2.0
Allows Guice Injection of configuration values from Typesafe Config

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Typesafeconfig Guice

Gulp Di
gulp-di is a dependency injection framework for the Gulp streaming build system.
Stars: ✭ 40 (-37.5%)
Mutual labels:  dependency-injection
Aiodine
🧪 Async-first Python dependency injection library
Stars: ✭ 51 (-20.31%)
Mutual labels:  dependency-injection
Pioneer Console Boilerplate
Dependency injection, logging and configuration in a .NET Core console application.
Stars: ✭ 60 (-6.25%)
Mutual labels:  dependency-injection
Vue.js With Asp.net Core Sample
This provides a sample code using vue.js running on ASP.NET Core
Stars: ✭ 44 (-31.25%)
Mutual labels:  dependency-injection
Factory
Factory for object creation and dependency injection. Works with normal C# apps or under Unity3d
Stars: ✭ 50 (-21.87%)
Mutual labels:  dependency-injection
Complex Redux Project Architecture
Redux architecture extended with a layer of services.
Stars: ✭ 53 (-17.19%)
Mutual labels:  dependency-injection
Nex
Aiming to simplify the construction of JSON API service
Stars: ✭ 35 (-45.31%)
Mutual labels:  dependency-injection
Lagom
📦 Autowiring dependency injection container for python 3
Stars: ✭ 61 (-4.69%)
Mutual labels:  dependency-injection
Toothpick
A scope tree based Dependency Injection (DI) library for Java / Kotlin / Android.
Stars: ✭ 1,061 (+1557.81%)
Mutual labels:  dependency-injection
Danf
Danf is a Node.js full-stack isomorphic OOP framework allowing to code the same way on both client and server sides. It helps you to make deep architectures and handle asynchronous flows in order to help in producing scalable, maintainable, testable and performant applications.
Stars: ✭ 58 (-9.37%)
Mutual labels:  dependency-injection
Ios
A sample project demonstrating MVVM, RxSwift, Coordinator Pattern, Dependency Injection
Stars: ✭ 49 (-23.44%)
Mutual labels:  dependency-injection
Android Mvvm Rxjava2 Dagger2
This repository contains a detailed sample application that uses MVVM as its presentation layer pattern. Essential dependencies are Dagger2 with Dagger-android, RxJava2 with RxAndroid, Room, Retrofit and Espresso.
Stars: ✭ 50 (-21.87%)
Mutual labels:  dependency-injection
Poodinis
A dependency injection framework for D with support for autowiring.
Stars: ✭ 57 (-10.94%)
Mutual labels:  dependency-injection
Zenject Hero
Zenject 7 - Game example (WIP)
Stars: ✭ 44 (-31.25%)
Mutual labels:  dependency-injection
Fx Guice
Google Guice integration for FXML-based JavaFX applications
Stars: ✭ 61 (-4.69%)
Mutual labels:  dependency-injection
Social Note
Social Note - Note-taking, sharing, time & location reminder
Stars: ✭ 38 (-40.62%)
Mutual labels:  dependency-injection
Simplify
Simplify is a set of .NET libraries that provide infrastructure for your applications. DI and mocking friendly.
Stars: ✭ 52 (-18.75%)
Mutual labels:  dependency-injection
Singularity
A extremely fast ioc container for high performance applications
Stars: ✭ 63 (-1.56%)
Mutual labels:  dependency-injection
Rea Di
Dependency injection for React done right. Hierarchical injection on both component and service layer powered by injection-js (Angular DI framework) 🖖
Stars: ✭ 62 (-3.12%)
Mutual labels:  dependency-injection
Macwire
Lightweight and Nonintrusive Scala Dependency Injection Library
Stars: ✭ 1,095 (+1610.94%)
Mutual labels:  dependency-injection

Typesafe Config Guice

Allows Guice to @Inject configuration values into your application derived from Typesafe Config.

Build Status

Available on Maven Central.

<dependency>
    <groupId>com.github.racc</groupId>
    <artifactId>typesafeconfig-guice</artifactId>
    <version>0.1.0</version>
</dependency>

Quickstart

Step 1:

Annotate configuration injection points (Constructors, Providers, Provider methods, Setter methods, Fields) with @TypesafeConfig("config.path.key")

Step 2:

Bootstrap your application with Guice and the TypesafeConfigModule. Configuration values annotated with @TypesafeConfig will be scanned for on the classpath, and then bound from your supplied Typesafe Config file.

Config config = ConfigFactory.load("config.conf");
Injector injector = Guice.createInjector(
	TypesafeConfigModule.fromConfigWithPackage(config, "com.my.package");
	// ... Add your other modules here
);

Step 3:

Profit!

Features

  • Plain Old Java Objects which follow JavaBean conventions (zero-args constructor, getters and setters) can be injected.
  • Supports injections of java.time.Duration objects with config parameters defined as "10 seconds", "10 minutes" etc.
  • Supports injections of com.typesafe.config.ConfigMemorySize objects with config parameters defined as "512k" or "2M" etc.
  • Supports injections of boolean, where the matching config parameter can be "true", "false", "yes" or "no".
  • Supports injections of List types of primitives: boolean, int, double, long, string, java.time.Duration, com.typesafe.config.ConfigMemorySize
  • Supports injections of java.util.Map<String, Object>
  • Supports injections of POJO Lists.
  • Extensive test coverage

AUTHOR

Jason Then

Any comments and feedback appreciated!

LICENSE

Copyright 2018 Jason Then

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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].