Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6388551
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:17:34+00:00 2026-05-25T03:17:34+00:00

For a new legacy application I have to use Latest Spring framework 3.x with

  • 0

For a new legacy application I have to use Latest Spring framework 3.x with Hibernate 3.x. Earlier I used Spring IoC with xml configuration. Now i would like to go for annotation based IoC.

Below link from rose india shows use annotation without xml file.
rose india

but i have found some other way of implementing in another site:
blog

I am confused here which way to implement IoC with latest technology.
Please refer some good site for sample. Also please share some sample code for IoC with annotation.

EDIT:

Spring reference document 3.x says use @Configuration or xml configuration i.e. with annotation <context:annotation-config/>. Which one is better to use? Why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:17:35+00:00Added an answer on May 25, 2026 at 3:17 am

    Your best bet is to start with the Spring 3.0 Documentation. If you already are familiar with Dependency Injection using xml configuration, take a look at Spring’s annotation support in Section 3.9 Annotation-based container configuration. There should be plenty of details there to help get you started.

    If this is not a WebApp, and you need to load the ApplicationContext yourself, you should take a look at Section 3.11 Java-based container configuration. This section details how you can create your ApplicationContext with your xml configuration.

    I would recommend using the @Autowired annotations for wiring with @Component annotation for defining beans within the ApplicationContext, and use the scan(String) method provided by the AnnotationConfigApplicationContext to find all annotated components:

    public static void main(String[] args) {
      AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext();
      ctx.scan("your.package.here");
      ctx.refresh();
      MyService myService = ctx.getBean(MyService.class);
      //use myService
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have an old legacy PHP application. Now I want to write a new
I have a new MVC3 application with a few legacy Web Form pages. I'm
I have a new application being written in .Net. I also have a legacy
I want to use Spring inside a legacy application. The core piece is a
I have a legacy application where an email.cfm file is used with a cfmail
I have a legacy ASP.Net web application that is basically used to process web
Scenario: old legacy code in rpg have to consume data from a new web
There is a legacy application in my company which is still in use. I
I am working with a legacy application that stored passwords in plaintext. I have
I want to design a new distributed application, but I have a few queries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.