1

I'v mostly used XML based configuration for applicationContexts. I have a requirement where I need to use @configuration to create my beans using @Bean now.

Brief description of why ?

weblogic deploys a spring web-app "A". A makes calls to B(not spring,not web app-no WEB_INF). B just contains common service calls to external servers. Hence B.jar is bundled into A and A is then deployed on web-logic. Now i need to use spring beans in B.)

So the options available at this point:

  1. Bundle applicationContext.xml and all the property files into B.jar. (keep in mind it is a very complex build process with 20 property files and 100s of beans. So I also need to register propertymanager bean etc..). Then initialize appcontext in a static initializer block and look for appcontext within B.jar.

  2. Use @configuration to register an Appconfig.class instead of an XML. (no changes to build process here).

With this option i need to use a clientInterceptor. Could you provide me with the @Bean definition of this. How do I configure clientInterceptor in @appconfig.class.

*please let me know if there any other options.

  • Spring-ws-core - 2.1.4.release
  • spring-core-3.2.4
  • expression,context,beans - 3.0.5
  • spring-oxm-1.0.3
  • weblogic - 12c
  • jdk - 1.7

This is my first post here. Any suggestions would be welcome and appreciated. Apologize for any forum faux paus.

TResponse
  • 3,940
  • 7
  • 43
  • 63
Sid
  • 115
  • 1
  • 12
  • hope [this](http://stackoverflow.com/questions/310271/injecting-beans-into-a-class-outside-the-spring-managed-context) helps. – Bond - Java Bond Feb 13 '15 at 06:19
  • kind of. But specifically i wanted a way to use MVC interceptors using @configuration. – Sid Feb 17 '15 at 03:56

0 Answers0