Commit Graph

64 Commits

Author SHA1 Message Date
Simon DeMartini
57c54fad2f Add and enforce spring checkstyle configurations 2022-03-20 10:40:10 +00:00
Simon DeMartini
7254dc8be7 Apply and enforce spring-javaformat 2022-03-19 21:15:20 +00:00
Simon DeMartini
ad60397400 Upgrade to latest mockito 2022-03-18 08:25:14 +00:00
Asi Bross
7434f407b6 Delay injector creation until after registerBeanPostProcessors() phase is complete 2021-08-30 16:52:10 -07:00
Howard Yuan
e54c544afa Add more logic to the test 2021-04-20 07:06:05 +01:00
Howard Yuan
c6b5fd89f6 Add Unit Test for lazy init Guice providers 2021-04-20 07:06:05 +01:00
Taylor Wicksell
ebfdb1be8e #80 fix issue where SpringModule did not respect Spring prototype scope 2020-08-24 16:34:07 -07:00
Asi Bross
7567e57ee1 Respect @Lazy annotation in GuiceAutowireCandidateResolver 2020-01-10 13:14:37 -08:00
Dave Syer
f759e6e4ab Add test for binding to Map by generic signature
See #67
2019-11-19 10:57:34 +00:00
Kevin Wang
4277d3e0f5 Fix handling FactoryBean 2019-11-18 13:50:17 -08:00
Dave Syer
61b3ac9c8d Fix more compiler warnings 2019-10-25 17:42:51 +01:00
Dave Syer
0a64a06bbc Fix compiler warnings 2019-10-25 17:40:31 +01:00
Kevin Wang
dc2a0b6495 Bind to super types 2019-10-23 13:01:07 -07:00
Kevin Wang
368ebc4d36 Add property to enable/disable Guice just-in-time bindings and log just-in-time bindings usage 2019-10-15 15:59:47 -07:00
Kevin Wang
1e7cbb0e31 Support generic interfaces 2019-10-15 15:45:40 -07:00
Kevin Wang
4308f7498b Bind all super interfaces 2019-10-15 15:45:40 -07:00
Taylor Wicksell
741f6e3794 fixed issue where modules were only being filtered from AppContext and not the Injector 2019-08-07 09:53:58 -07:00
Taylor Wicksell
0ecc98d4cb ensure BindingAnnotations are treated as Qualifiers in Spring 2019-05-06 10:03:05 -07:00
Taylor Wicksell
6fec10d19c fixed issue where multibindings in guice cause duplicate beans in Spring 2019-05-06 10:02:53 -07:00
Spring Operator
3650197554 URL Cleanup
This commit updates URLs to prefer the https protocol. Redirects are not followed to avoid accidentally expanding intentionally shortened URLs (i.e. if using a URL shortener).

# Fixed URLs

## Fixed Success
These URLs were switched to an https URL with a 2xx status. While the status was successful, your review is still recommended.

* [ ] http://www.apache.org/licenses/LICENSE-2.0 with 25 occurrences migrated to:
  https://www.apache.org/licenses/LICENSE-2.0 ([https](https://www.apache.org/licenses/LICENSE-2.0) result 200).
2019-03-27 15:32:41 +00:00
Taylor Wicksell
ea8e68674c map all non-singleton bindings as prototype scoped beans 2019-03-13 15:38:34 -07:00
Asi Bross
0bc99b690a Ignore Collection types from GuiceAutowireCandidateResolver 2019-03-06 14:05:44 -07:00
Taylor Wicksell
697d2ede55 add property spring.guice.modules.exclude to filter guice modules by name 2019-03-06 14:04:44 -07:00
Dave Syer
fd835487d3 Ensure *Aware contracts can be satisfied in ModuleRegistryConfiguration
If the BeanFactoryProvider is used there is a partially refreshed
ApplicationContext floating around. It works better if it is able to
inject Environment etc. via the Aware interfaces into early beans
like post processors.
2019-01-10 09:21:51 +00:00
Dave Syer
af2497c6d8 Polish 2019-01-10 09:21:24 +00:00
Howard Yuan
4398a3389a Fix lost Supplier<T> type info in Guice2Spring direction 2018-11-09 14:36:57 -08:00
Taylor Wicksell
2207c4f1d9 make bean names unique when considering binding annotations
translate binding annotations into Spring @Qualifiers
2018-11-09 10:55:53 -08:00
Taylor Wicksell
0153079327 use Key<?> for binding dedupe check in SpringModule to include annotations
fix issues where @Named was not considered when fetching beans of the same type
2018-11-09 10:55:53 -08:00
Taylor Wicksell
b2a767e51a support Guice binding annotations in SpringModule 2018-03-28 09:35:48 -07:00
Taylor Wicksell
1680610faf create injector before embedded server initialization, after other BeanPostProcessors 2018-03-01 11:51:06 -06:00
Taylor Wicksell
5e3603c29d remove check for Tool stage from SpringModule as it is no longer required 2018-03-01 11:10:40 +00:00
Taylor Wicksell
a098f7854b Added an option to deduplicate bindings in favor of Spring
User can set Environment property spring.guice.dedup=true.
2018-03-01 09:53:31 +00:00
Taylor Wicksell
e94c94837f Restore support for Guice PrivateModule's
See #32
2018-02-28 18:04:41 +00:00
Taylor Wicksell
aae2e1fc47 support multiple stages, as can occur when using ElementVisitors 2018-02-27 16:50:46 +00:00
Taylor Wicksell
bd30107666 Ensure bean post processors are applied before injector is created
In this way, Guice modules can declare bindings asEagerSingleton()
2018-02-22 16:14:35 +00:00
Dave Syer
8e26ec0f3c Add a test for generic bean type
Fixes gh-26
2018-02-01 09:04:32 +00:00
Dave Syer
9a8af0efd6 Add another test
See gh-26
2017-12-21 16:18:05 +00:00
Dave Syer
becf90b951 Add another test for @EnableGuiceModules
See gh-22
2017-12-21 16:14:47 +00:00
Matt Metlis
fda2edb524 Make GuiceModuleRegistrar handle excludeNames filter correctly. 2017-12-21 16:03:22 +00:00
Taylor Wicksell
5e14e96248 make GuiceModuleMetadata handle ParameterizedType's correctly #20 2017-08-01 07:02:55 +01:00
Dave Syer
63c8c2e47f Tidy up package structure a bit 2017-06-04 11:23:02 +01:00
Dave Syer
490fc20cf7 Extract BeanFactoryProvider into convenience class 2017-06-01 11:12:54 +01:00
Dave Syer
a01511f269 Add Maven wrapper 2017-06-01 11:12:54 +01:00
Taylor Wicksell
b26bdb4125 Make SpringModule aware of bindings in wrapping Injector
See gh-13, gh-12
2017-06-01 11:12:32 +01:00
Taylor Wicksell
061aef36f2 support binding of generic interfaces from SpringModule 2017-06-01 08:32:23 +01:00
Dave Syer
9dae979d39 Add some tests 2017-05-26 14:22:25 +01:00
Dave Syer
5708ba0469 Add test for spring module including another guice module
This test is from a PR by @twicksell, but modified to run without
any changes in spring-guice. See gh-12 for discussion.
2017-05-24 17:40:03 +01:00
Dave Syer
771edd3711 Add support for @Named beans in SpringModule
A SpringModule now registers all beans by type and by name
separately, so clients can inject qualified instances.
2017-05-21 13:29:51 +01:00
Taylor Wicksell
8fd316ce23 add test case for InjectorFactory usage
added startup exception when multiple InjectorFactory definitions are provided
2017-05-21 08:44:21 +01:00
Dave Syer
1002284360 Add support for bean names
Users can in inject Spring beans by name in Guice using
@Named, or they can inject Guice beans in Spring as long
as they have @Named providers.

Fixes gh-7
2016-06-02 10:25:32 +01:00