Results 1 to 10 of 10

Thread: The Status of Java-config

Hybrid View

  1. #1

    Default The Status of Java-config

    Hi, Chris!

    I'd like to understand the current status of Java-config / Java-based container configuration.

    In my humble understanding the work on standalone Java-config project is stale since 1.0.0M4 in favor of integration with Spring3, so generally, there is not reason to sick to it.

    On the other hand, the current implementation in Spring3 RC2 is only a subset of the standalone Java-config capabilities. A lot of features, existing in 1.0.0M4 simply do not exist in Spring3 RC2. E.g. - @AspectJAutoProxy, @AnnotationDrivenTx, etc.

    Generally, Release Candidate implies that feature-freeze. Does it mean final version of Spring3 Java config won't have those critical features?

    When considering using Java-config for new project, which path should I take?

    Thanks,
    Baruch.

  2. #2
    Join Date
    Apr 2007
    Posts
    307

    Default

    Hi Baruch!

    If you're starting out with a new project, Spring 3 is the way to go. As you've noticed, most but not all of the JavaConfig features have made their way into Spring 3. And the features that are not there will be added incrementally based on user demand and thinking about the best way to implement them going forward.

    For example, @AspectJAutoProxy works nicely, but this is not an approach that we want to commit to in Spring core. It suggests that every namespace and element should have an annotation-based equivalent, and that duplication of efforts is not ideal.

    There are several ideas on the table for how to leverage the power of Spring's namespaces without leaving Java, but in the meantime, we've provided a simple mechanism to import Spring XML files from within a @Configuration class. In JavaConfig this was called @ImportXml, today in Spring 3.0 it is called @ImportResource.

    You'll find that JIRA issues have been created for most JavaConfig features missing from Spring 3. If you have others, or any additional requests, please don't hesitate to file an issue.
    Chris Beams
    Spring Framework committer, VMware
    http://github.com/cbeams

  3. #3

    Default

    OK, so generally, there is some regression in functionallity, and we need to fallback to XML for everything that we miss. OK, fair enough, as long as those gaps are going to be closed.

    Thanks!

  4. #4
    Join Date
    Apr 2007
    Posts
    307

    Default

    Exactly, thanks for understanding. Always better to add functionality later than need to remove something added hastily now
    Chris Beams
    Spring Framework committer, VMware
    http://github.com/cbeams

  5. #5

    Default so where can we see...

    @ComponentScan is pretty important to me, as are some of the other missing features from spring java config. Is there a way that we can track this?

    Also ImportResource is nowhere near as friendly as ImportXML is/was...

  6. #6
    Join Date
    Aug 2008
    Posts
    9

    Default

    I've filed SPR-7194 for including @ComponentScan in Spring Core. Please vote for the issue if you'd like.

    http://jira.springframework.org/browse/SPR-7194

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •