Blog Archives
1 2

CDI annotations @Named and @Inject Dependency Injection in Spring 3.0 Tutorial

In Spring 3.0 the support for the CDI annotations @Named and @Inject are provided.

1) @Inject instead of Spring’s @Autowired to inject a bean.
2) @Named instead of Spring’s @Component to declare a bean.

Step 1: Create a simple Maven project.

Read more ›



Spring 3.0 tutorial – Part 1 (Setter DI )

This is a very simple Spring setter DI (depenendency injection tutorial). This assumes that you have gone through the “Setting up Java, Maven and Eclipse” tutorial. To recap:

1) Java, Maven, and eclipse are set up.
2) You have run the Maven archetype:generate command to create a skeleton structure.

Read more ›



Spring 3.0 tutorial – Part 2 (Constructor DI )

This is a very simple Spring constructor DI (depenendency injection tutorial). This assumes that you have gone through the “Setting up Java, Maven and Eclipse” tutorial. To recap: 1) Java, Maven, and eclipse are set up. 2) You have run the Maven archetype:generate command to create a skeleton structure. …...

Members Only Content
Log In Register Home


Spring 3.0 tutorial – part 3 (Setter DI with annotations)

This is a very simple Spring setter DI (dependency injection tutorial) using annotations. This assumes that you have gone through the “Setting up Java, Maven and Eclipse” tutorial. To recap:

1) Java, Maven, and eclipse are set up.
2) You have run the Maven archetype:generate command to create a skeleton structure.

Read more ›



Spring 3.0 tutorial – part 4 (Setter DI with annotations and Java Config instead of XML)

This is a very simple Spring setter DI (dependency injection tutorial) using annotations. This is using a Java based Spring configuration with @configuration annotation as opposed to an XML based file. This assumes that you have gone through the “Setting up Java, Maven and Eclipse” … Read more ›...

Members Only Content
Log In Register Home


Spring 3.0 tutorial – part 5 (Setter DI with Spring AOP and AspectJ)

This is a very simple Spring AOP tutorial using AspectJ. This assumes that you have gone through the “Setting up Java, Maven and Eclipse” tutorial and the other Spring tutorials 1 to 3. This annotation profiles the time taken to execute the annotated methods.

You need to have a project structure as shown below with the relevant artifacts.

Read more ›



Spring 3.0 tutorial – part 6 (with Hibernate & HSQLDB)

This is a very simple Spring tutorial with Hibernate and HSQLDB. This assumes that you have gone through the tutorials

1) Setting up Java, Maven, and Eclipse
2) The “Course” table is created as per the tutorials “SQL Tutorial with HSQLDB” and “JDBC Tutorial with HSQLDB”
3) Spring 3.0 tutorial part 1 to part 3.

Read more ›



1 2
Why & What are the benefits

🎯 Why java-success.com?

🎯 What are the benefits of Q&As approach?

Learn by categories such as FAQs – Core Java, Key Area – Low Latency, Core Java – Java 8, JEE – Microservices, Big Data – NoSQL, Architecture – Distributed, Big Data – Spark, etc. Some posts belong to multiple categories.

800+ Java & Big Data Q&As Menu

Top