liveBook · Manning

Plain old java object

As explained in Spring Start Here, Second Edition

A Java object that does not require framework-specific inheritance or interfaces.

A plain old Java object (POJO) is a simple object with attributes and methods, without dependencies. It can model application data without needing annotations to be used as a POJO. section 4.1.3 section 2.3

Listing 4.1 Defining the comment
public class Comment {
 
  private String author;
  private String text;
 
  // Omitted getters and setters
}

Comment is a small POJO that models a comment with author and text fields. section 4.1.3

How Spring Start Here, Second Edition covers it

How deep it goes
Defines a POJO as an object with attributes and methods and no dependencies, without expanding into further design rules.
Examples
Uses Comment with author and text fields, and an unannotated Parrot registered as a Spring bean.
What you can do after
Build it from scratch by defining a Java class with data attributes and methods, as the Comment example does.
How it connects
Connects POJOs to Java classes, model objects, the Spring context, and programmatic bean registration.

Also explained in

Compare how 2 books explain plain old java object →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Spring Start Here, Second Edition. The section links point to the parts of the book it draws on.