vipx / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Spring integration #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Let's make Spring integration trival, so it's easy to share or migrate.
Here's how it will work:

The user must provide a binding to Spring's BeanFactory.

Then, we'll have the following class:

class SpringIntegration {

  static <T> Provider<T> fromSpring(Class<T> type, String name) {
    ...
  }
}

The returned provider will look up the Bean with the given name in the
bound BeanFactory.

Original issue reported on code.google.com by crazybob...@gmail.com on 28 Feb 2007 at 8:51

GoogleCodeExporter commented 9 years ago
The resulting configuration will look like this:

bind(DataSource.class).toProvider(fromSpring(DataSource.class, "dataSource"));

Original comment by crazybob...@gmail.com on 28 Feb 2007 at 8:53

GoogleCodeExporter commented 9 years ago
I'm fuzzy on the details, but the idea of making spring and guice share their 
stuff
with each other is A+.

Original comment by kevin...@gmail.com on 28 Feb 2007 at 9:00

GoogleCodeExporter commented 9 years ago
This should be pretty easy.

Original comment by crazybob...@gmail.com on 28 Feb 2007 at 10:54

GoogleCodeExporter commented 9 years ago
This would definitely encourage adoption as it gives people an easy way to dip 
their toes into guice without 
having to commit too much

Original comment by bileb...@gmail.com on 1 Mar 2007 at 12:18

GoogleCodeExporter commented 9 years ago

Original comment by crazybob...@gmail.com on 3 Mar 2007 at 12:24