Releases: avaje/avaje-inject
8.12 | 7.12
What's Changed
- #253 - Fix for @secondary and @primary not used with @factory @bean methods by @rbygrave in #254
- #258 - ENH: Add Plugin API for 'default providers' and BeanScopeBuilder.provideDefault() methods by @rbygrave in #259
- Use different classloader for AP Plugin/Module ServiceLoader by @SentryMan in #263
- Use Aspect Provider instead of Concrete Aspect Target by @SentryMan in #268
- Update Aspect generation - add aspectProvides() meta data by @rbygrave in #270
- Add Aspect Auto Requires by @SentryMan in #271
- Auto-Require Maven Plugin - avaje-inject-maven-plugin by @SentryMan in #274
- avaje inject maven plugin (to automatically determine the provided components and plugins) by @rbygrave in #275
- Prisms 1.3/Turn Aspect Reader into a method by @SentryMan in #279
- #255 - Use fully qualified types for TYPE_ generic types (to avoid clash on short name imports)
- #256 - Support the case of @factory @bean that needs to use fully qualified class name (short name clashes)
- #257 - Make generated classes final
- #259 #258 - ENH: Add Plugin API for 'default providers' and BeanScopeBuilder.provideDefault() methods
- #260 - ENH: Enhance @InjectTest with support for @setup methods & when @Inject, @mock provide values use them
- #261 - ENH: Improve generated code for aspects - not generate the unused $DI as we only use the $Proxy$DI
- #262 - ENH: Simplify multi-module compilation and wiring by auto detecting provides and requires
- #269 - AutoProvideAspects doesn't work as expected
- #272 - AutoRequires doesn't work when using mvn compiler plugin.
- #276 - Ideally avaje-inject-generator should not depend on avaje-inject
- #277 - Use Avaje Prisms instead of referencing annotations directly
Full Changelog: avaje-inject-8.11...avaje-inject-8.12
avaje-inject-8.11
What's Changed
- Add Quick Start to README by @SentryMan in #246
- #243 - Fix for ClassCastException with generic types by @rbygrave in #248
- Now class aspects are included with method aspects by @SentryMan in #249
- Fixes Aspects not working for Certain Types by @SentryMan in #251
- #251 - Adjustments for fixing Aspects on methods with generic parameters by @rbygrave in #252
New Contributors
- @SentryMan made their first contribution in #246
Full Changelog: avaje-inject-8.10...avaje-inject-8.11
8.10 | 7.10
8.9 | 7.9
8.8 | 7.8
8.7 | 7.7
avaje-inject-8.6
Issues
#229 - Custom scope with @InjectModule can mess up the "default module @InjectModule" bug
#228 - Support generic super types e.g. CRUDService<T, KeyType> extends ReadService<T, KeyType>, ... bug
#226 - Injecting Generics refactor and fix
#224 - Injecting Generics with a Context generates bad code. bug
Enhancements
#230 #231 - ENH: Add support for injecting into Map<String,T> (by qualifier)
#227 - Gradle : Full recompilation is required because io.avaje.inject.generator.Processor is not incremental
#225 - Add BeanScope.list(Type) to support generic types enhancement
8.5 | 7.5
Issues
#219 - Partial compile can fail with injection of List or Set when empty ... "soft" dependencies need to be in meta data bug
#218 - Test environment injection of external beans bug
#217 - Dependencies [javax.sql.DataSource] are not provided - missing @Singleton, @Component, @Factory/@Bean or specify external dependency via @InjectModule requires attribute
8.4 | 7.4
8.3 | 7.3
Comments
This release adds great support for "component testing". I'll be updating the docs to reflect but there are 2 main things:
- There are 3 levels of scopes in testing - A Global scope (via
@TestScope) used across all tests + Test class (forAll / static fields) scope + Test instance (forEach / instance fields). Most component tests will use 2 or 3 of these levels in a layering way (parent/child BeanScopes). - The junit5 InjectExtension has a Plugin API and I've used this with avaje-jex-test. This plugin API detects via types (e.g. http client type) if it should be part of a test and can create instances that get injected into the test. For example, with avaje-jex-test the plugin detects if a http client type is being injected and if so creates a http server using a random port + client, supplies the client to the test and at the end of the test scope shuts down the http server.
So with these features in place avaje-inject-test is now what I've wanted it to be wrt support of component testing. Docs and examples need some attention to reflect these features.
Cheers, Rob.
Issues
#213 - BUG: reference to Builder is ambiguous ... when injecting a class with simple name of Builder
#207 - Rename "with" methods with deprecate. e.g. migrate withBean() -> bean(), withSpy() -> spy()
#206 - Add BeanScope.builder() to replace BeanScope.newBuilder() with deprecation.
#202 - Can not apply Spy to a bean in the test scope bug
Enhancements
#214 - ENH: Add support for using @Prototype on @Factory @Bean methods enhancement
#211 #212 - ENH: Add Plugin API for avaje-inject-test ... e.g. Inject a http client into a test and start/stop http server
#211 - ENH: Add Plugin API for avaje-inject-test ... e.g. Inject a http client into a test and start/stop http server
#208 #209 - Fix @InjectTest / InjectExtension to support static field injection
#203 #204 #205 - Add @InjectTest + TestScopeBean with helper methods to programmatically use the test scope
#204 - Add @InjectTest as synonym for @ExtendWith(InjectExtension.class)
#203 - Add TestScopeBean as helper methods to programmatically use the test scope