concept Parrot in category spring

appears as: Parrot
Spring Quickly

This is an excerpt from Manning's book Spring Quickly.

We create a Maven project and define a class. Because it’s funny to imagine, I’ll consider a class named Parrot with only a String attribute representing the name of the parrot. Remember, in this chapter, we only focus on the approaches to adding beans to the Spring context, so it’s ok to take any object that helps you remember the syntaxes easier. You find the code for this example in project gsws-ch2-ex1 (you can download the projects from the “Resources” section of the livebook). For your project, you can use the same name, or you can choose one that you prefer.

Listing 2.1 presents the Parrot class.

Listing 2.1 The Parrot class
public class Parrot {

  private String name;

  // Omitted getters and setters
}

You can now define a class containing the main method and create an instance of the class Parrot, as presented in listing 2.2. I usually name this class Main.