What you will learn in Spring Start Here, Second Edition
Chapter by chapter
Chapter 1: Spring in the real world
Introduces Spring as a widely used Java/JVM application framework and explains that the book’s Java examples teach concepts applicable in other JVM languages.
What you learn in chapter 1 →Chapter 2: The Spring context: Defining beans
Introduces the Spring application context as the place where object instances must be added for Spring to manage them.
What you learn in chapter 2 →Chapter 3: The Spring context: Wiring beans
The chapter introduces how Spring-managed beans collaborate by receiving references to one another, and names two basic ways to establish those relationships.
What you learn in chapter 3 →Chapter 4: The Spring context: Using abstractions
This introduction explains why Spring applications use interfaces to decouple components and dependency injection to supply implementations.
What you learn in chapter 4 →Chapter 5: The Spring context: Bean scopes and life cycle
Introduces bean scopes as Spring’s approaches to creating and managing beans, identifying singleton as the default and prototype as another common scope.
What you learn in chapter 5 →Chapter 6: Using aspects with Spring AOP
Introduces aspects as a way to add shared behavior to method calls without repeating it in each method.
What you learn in chapter 6 →Chapter 7: Understanding Spring Boot and Spring
This introduction shifts the focus to Spring web apps and explains why Spring Boot makes Spring applications quicker to create.
What you learn in chapter 7 →Chapter 8: Implementing web apps with Spring Boot and Spring MVC
Introduces dynamic web views and explains that a template engine displays variable data sent by a controller.
What you learn in chapter 8 →Chapter 9: Using the Spring web scopes
Introduces Spring’s three web bean scopes by comparing how long their instances are available.
What you learn in chapter 9 →Chapter 10: Implementing REST endpoints
The introduction explains why AI-generated REST services need careful review and previews the chapter’s endpoint topics.
What you learn in chapter 10 →Chapter 11: Consuming REST endpoints
This introduction explains why a Spring backend may need to call another service’s REST endpoints and why developers need to understand the available approaches.
What you learn in chapter 11 →Chapter 12: Using data sources in Spring apps
The introduction explains why database persistence matters to Spring apps and introduces the chapter’s topic without teaching its implementation.
What you learn in chapter 12 →Chapter 13: Using transactions in Spring apps
This introduction explains why transactions are needed to keep related data changes consistent when one step fails.
What you learn in chapter 13 →Chapter 14: Implementing data persistence with Spring Data
Introduces the persistence layer and explains how Spring Data reduces the code needed to work with database data.
What you learn in chapter 14 →Chapter 15: Unit testing in Spring apps
The chapter introduction defines tests, distinguishes unit from integration tests, and explains why testing protects an app’s capabilities over time.
What you learn in chapter 15 →Chapter 16: Implementing integration tests for Spring apps
This introduction explains what Spring integration tests check and why they complement unit tests.
What you learn in chapter 16 →Concepts explained in this book
- Spring beanAn object instance created, configured, and managed by the Spring IoC container.
- @BeanA Spring annotation that marks a method whose returned object is registered as a bean.
- interceptorAn aspect is a modular unit in aspect-oriented programming that intercepts selected program operations and applies cross-cutting behavior.
- spring-contextThe spring-context module is a Spring Framework module that provides the application context and related infrastructure.
- DataSourceDataSource is an API abstraction that provides connections to a database.
- configuration classA configuration class is a Spring class annotated with @Configuration that declares instructions for configuring the Spring context.
- integration testAn integration test verifies behavior across multiple integrated components or systems.
- interfaceA Java interface is a reference type that declares a responsibility or contract whose behavior must be provided by implementing classes.
- database transactionA transaction is a unit of data processing whose changes are managed together so that either all required changes succeed or none are applied.
- stereotype annotationA stereotype annotation is a Spring annotation that declares an application class's role so Spring can detect and manage it as a component.
- Spring BootSpring Boot is a Spring ecosystem project that provides convention-based default configuration for Spring applications.
- @MockitoBeanA Spring Test annotation that registers a Mockito mock in the test application context, replacing an existing bean when one matches.
- JdbcTemplateJdbcTemplate is a Spring API component that simplifies JDBC database access by handling recurring connection, statement, and result-processing code.
- Spring DataSpring Data is a family of Spring projects that simplifies access to data stores through consistent repository-based abstractions.
- unit testA unit test checks the behavior of a small, isolated unit of code.
- frameworkA software framework is a reusable foundation of components, conventions, and extension points for developing software.
- SpringSpring Framework is an open-source Java framework for building enterprise and web applications.
- CrudRepositoryCrudRepository is a Spring Data repository interface that declares common create, retrieve, update, and delete operations for a model type.
- payloadAn HTTP request body is the payload portion of a request that carries data sent by the client.
- component annotationThe component annotation is a Spring annotation that marks a class for automatic detection and registration as a bean.
- WebClientWebClient is a non-blocking, reactive HTTP client API in Spring for making web requests and processing responses.
- repository annotationThe Spring @Repository stereotype annotation marks a class as a data-access component eligible for bean registration.
- singleton scopeA singleton bean is a Spring bean for which the container maintains one shared instance within its context.
- Transactional annotationThe Spring @Transactional annotation declares that a method or class should execute within a managed transaction.
- abstractionAn abstraction is a representation that separates the behavior an object requires from the details of how that behavior is implemented.
- mockingA mock object is a controllable test double that simulates a dependency and allows its interactions to be inspected or verified.
- Spring MVCSpring MVC is the Spring web framework for developing applications that handle HTTP requests.
- web API action methodA controller action is a controller method associated with an HTTP request and responsible for producing the request's response.
- primary annotationThe @Primary annotation marks a Spring bean as the preferred candidate when multiple beans match a dependency.
- @ComponentScan annotationA Spring annotation that configures package scanning for classes marked with component stereotype annotations.
- primary beanA primary bean is a Spring bean designated as the default candidate when multiple beans of the same type are available.
- JdbcTemplate update methodThe JdbcTemplate update method executes a SQL statement that changes database data and returns an update count.
- OpenFeignOpenFeign is a declarative HTTP client library that generates implementations of Java interfaces for calling remote services.
- dependency injectionDependency injection is a pattern in which an object's dependencies are supplied by an external component rather than constructed by the object itself.
- prototype scopePrototype scope is a Spring bean scope in which the container creates a new instance each time the bean is requested.
- BigDecimalBigDecimal is a Java numeric type that represents decimal values with arbitrary precision and is suitable for exact monetary calculations.
- RowMapperA RowMapper is a Spring JDBC callback interface that converts one row of a result set into an application object.
- controller integration testA controller integration test verifies a web controller's endpoint contract, including request handling and response behavior.
- MockMvcMockMvc is a Spring testing API that performs requests against Spring MVC controllers without starting a real HTTP server.
- @SpringBootTest@SpringBootTest is a Spring Boot test annotation that loads an application context for integration testing.
- DataAccessExceptionDataAccessException is Spring's unchecked base exception type for data-access failures.
- relational databaseA relational database organizes data into related tables of rows and columns.
- @Modifying annotationThe @Modifying annotation marks a Spring Data repository query method as performing a data-changing operation rather than only retrieving data.
- @QueryThe @Query annotation declares the query expression that Spring Data uses to implement a repository method.
- ResponseEntityResponseEntity is a Spring type that represents an HTTP response together with its body, status, and headers.
- request scopeA request-scoped bean is a Spring-managed bean with a distinct instance for each HTTP request.
- reactive programmingA reactive approach structures asynchronous operations around nonblocking results and declared dependencies.
- HTTP methodAn HTTP method is the standardized operation token in an HTTP request that indicates the intended action on a resource.
- @Around annotationThe @Around annotation marks aspect advice that can run before, after, or instead of an intercepted method and can control whether that method proceeds.
- AspectJ pointcut languageAn AspectJ pointcut expression selects join points, such as method executions, where aspect advice applies.
- constructor injectionConstructor injection is a dependency-injection technique that supplies an object's dependencies through its constructor parameters.
- controllerA controller in Spring MVC is an application component that receives and handles web requests and produces responses.
- endpointAn endpoint is a network-accessible interface through which a service exposes or consumes an operation or resource.
- data layerA persistence layer is a software layer responsible for storing and retrieving application data beyond the lifetime of a process.
- @requestmappingRequest mapping is the association between an HTTP request pattern and the controller handler that processes it.
- proceed() methodThe proceed() method continues an intercepted invocation, optionally supplying replacement arguments.
- custom repository operationA custom repository operation is a repository method that performs a data-access action beyond the repository's inherited standard operations.
- @ControllerThe @Controller annotation marks a class as a Spring MVC controller component eligible for management by Spring.
- Spring ecosystemThe Spring ecosystem is the collection of Spring frameworks and related projects that support application development.
- threadA thread is an independently schedulable execution unit that runs instructions within an application process.
- MonoMono is a Reactor publisher type that represents an asynchronous computation producing zero or one result.
- reactive applicationA reactive application coordinates asynchronous data flows and tasks without blocking threads during I/O.
- sink nodeA subscriber is a reactive component that attaches to a producer and consumes its eventual result.
- endpoint contractAn endpoint contract is the specification of a web endpoint's URL, HTTP method, inputs, outputs, status, headers, and validation behavior.
- WebApplicationContextWebApplicationContext is a Spring application context that contains web-layer configuration, controllers, and their required components.
- session scopeA session-scoped bean is a Spring-managed bean whose instance is shared across requests in the same HTTP session.
- derived query methodQuery derivation is the technique of generating a database query by interpreting a repository method's name according to framework naming rules.
- proxyA proxy object intercepts calls to a target object and can apply additional behavior before delegating to it.
- DispatcherServletA dispatcher servlet is the Spring MVC servlet that receives web requests and coordinates their dispatch to controller actions and response rendering.
- dynamic viewA dynamic view is a presentation resource whose rendered content is generated or populated from runtime application data.
- repository patternA repository is an abstraction that provides access to stored application data.
- ProceedingJoinPointProceedingJoinPoint is a Spring AOP join-point object that exposes the intercepted invocation, including its method, arguments, target object, and continuation of execution.
- JDBC driverA JDBC driver is a database-specific software component that implements JDBC interfaces to enable Java applications to communicate with a relational database.
- convention over configurationConvention over configuration is a software design approach in which standard conventions supply defaults and explicit configuration is needed only for deviations.
- inversion of controlInversion of control is a design principle in which a framework or container takes responsibility for coordinating application components instead of the components controlling that coordination themselves.
- HTTP GETGET is the HTTP method for requesting a representation of a resource without intending to change server-side state.
- POSTPOST is the HTTP method for submitting data to a resource for processing, often resulting in a state change.
- Spring CoreThe foundational Spring project that provides the core container and dependency-injection infrastructure for Spring applications.
- @ExceptionHandlerThe @ExceptionHandler annotation identifies a method that handles specified exceptions thrown during controller request processing.
- @RestControllerAdvice@RestControllerAdvice is a Spring annotation for applying shared advice, including exception handling, to REST controllers.
- design-first approachA contract-first approach develops an API by specifying its interface before implementing the endpoint and generating implementation artifacts from that specification.
- viewA view is the presentation resource whose content is rendered and returned as a web response.
- view resolverA view resolver is a Spring MVC component that locates a view from the name returned by a controller action.
- Spring bean nameA bean name is an identifier assigned to a Spring-managed bean for selecting or referring to that bean.
- Spring Data AccessSpring Data Access is a Spring Core module providing foundational database access, JDBC, and transaction capabilities.
- HTTP request parameterAn HTTP request parameter is a named value supplied with a request, such as in its query string or submitted form data.
- @ServiceThe Spring @Service stereotype annotation marks a class as a service component eligible for detection and registration as a bean.
- qualifier annotationThe @Qualifier annotation identifies which bean should be selected when multiple beans match an injection point.
- @AutowiredThe Spring @Autowired annotation marks a constructor, field, or method for automatic dependency injection.
- exception handlerAn exception handler is a method that defines the response or other processing performed for a particular exception.
- OpenAPI specificationOpenAPI is a standard, machine-readable specification format for describing HTTP APIs, including their operations, inputs, and responses.
- advice annotationAn advice annotation is a Spring AOP annotation that specifies when aspect logic runs relative to an intercepted method execution.
- path variableA path variable is a value conveyed within a request path, typically as a variable segment of a resource URI.
- autowiringAutowiring is the technique of having Spring automatically resolve and establish dependencies among managed beans.
- RestClientRestClient is Spring's synchronous HTTP client for sending requests and waiting for responses from remote services.
- servlet containerA servlet container is server software that receives HTTP requests, sends HTTP responses, and integrates those exchanges with Java web applications.
- data transfer objectA data transfer object is an object that carries structured data between software applications or application boundaries.
- credentialA credential is information, such as a username and password, used to verify a user's identity.
- @RequestScoped annotationThe @RequestScoped annotation marks a Spring bean as having request scope.
- RestTemplateRestTemplate is a Spring HTTP client API for synchronously sending requests and receiving responses from remote services.
- Spring InitializrSpring Initializr is a service that generates configured starter projects for Spring applications.
- backendThe execution environment where backend software runs and processes client requests.
- front controllerA front controller is an architectural pattern in which a single entry point centrally processes requests and dispatches them to appropriate handlers.
- handler mappingA handler mapping is a Spring MVC component that selects a controller action for an incoming request based on request conditions such as path and HTTP method.
- static web pageA static web page is delivered as stored content rather than generated dynamically for each request.
- plain old java objectA Java object that does not require framework-specific inheritance or interfaces.
- web applicationA web application is software accessed through web technologies, typically using a browser as its client interface.
- @FeignClient annotationThe @FeignClient annotation declares an interface as a client for a remote service and provides configuration for generating its implementation.
- Spring IoC containerThe Spring IoC container creates, configures, and manages Spring application objects and their dependencies.
- @Aspect annotationThe @Aspect annotation marks a class as defining aspect-oriented behavior for interception by an aspect framework.
- ThymeleafThymeleaf is a Java server-side template engine for processing HTML and other markup templates with application data.
- serviceA service is an application component responsible for implementing one or more use cases.
- @EnableFeignClients annotationThe @EnableFeignClients annotation enables OpenFeign client support and configures scanning for client interfaces.
- OpenFeign clientAn OpenFeign client is an annotated Java interface whose implementation is generated to call remote HTTP endpoints.
- field injectionField injection is a dependency-injection technique that assigns a dependency directly to an object's field.
- race conditionA race condition is an incorrect or nondeterministic result caused by concurrent operations accessing shared state without adequate coordination.
- @responsebodyThe @ResponseBody annotation declares that a controller action returns data directly in the HTTP response rather than a view name.
- restcontroller annotationThe @RestController annotation marks a Spring MVC controller whose actions return response data directly and are treated as REST endpoints.
- @PostConstructAn annotation that marks a method to be invoked after dependency injection is complete and before the managed object is put into service.
- HTTP responseAn HTTP response is a message returned by an HTTP server containing a status and optional headers and content.
- template engineA template engine is software that combines a view template with data to generate rendered output such as HTML.
- @Order annotationThe @Order annotation assigns an execution precedence to components whose ordering affects how they are processed.
- loose couplingDecoupling is the reduction of direct dependencies between software components so that one component's implementation can change independently of another's.
- Spring Boot starterA dependency starter is a curated dependency descriptor that brings together libraries for a particular Spring Boot capability.
- HikariCPHikariCP is an open-source JDBC connection-pooling library that provides a data source implementation for Java applications.
- assertThrowsThe JUnit assertion method assertThrows() executes code and verifies that it throws an expected exception type.
- beforeEachThe @BeforeEach annotation marks a JUnit Jupiter method for execution before each test method.
- ExtendWithThe JUnit Jupiter @ExtendWith annotation registers one or more extensions that integrate with the test lifecycle.
- given() methodThe Mockito given() method defines the behavior a mock exhibits when a specified method call occurs.
- @InjectMocks annotationThe Mockito @InjectMocks annotation marks an object for creation with mock dependencies injected into its constructor, fields, or methods.
- @Mock annotationThe Mockito @Mock annotation marks a field or parameter for automatic initialization as a mock object.
- mock methodThe Mockito mock() method creates a mock object for a specified Java type.
- MockitoMockito is a Java mocking framework for creating configurable test doubles and verifying their interactions.
- MockitoExtensionMockitoExtension is a JUnit Jupiter extension that initializes Mockito annotations and integrates Mockito with test execution.
- never() verification modeThe Mockito never() method returns a verification mode that checks that a mock method was not called.
- verify() methodThe Mockito verify() method checks whether a specified interaction with a mock occurred.
- Spring MVC modelThe Spring MVC Model holds attributes that a controller makes available to a view.
- PagingAndSortingRepositoryPagingAndSortingRepository is a Spring Data repository interface that adds paging and sorting operations to CRUD repository operations.
- JSONJSON is a text-based data-interchange format that represents structured data using objects, arrays, values, and name-value pairs.
- application scopeApplication scope is a Spring bean scope in which Spring creates one bean instance for the whole application and shares it across requests.
- MVC modelA model is an application object that represents data used by the application and made available for presentation.
- frontendThe client side is the part of an application that runs on a user's device and communicates with backend software.
- @IdThe @Id annotation identifies the property or field that uniquely identifies a persistent entity.
- application.propertiesapplication.properties is a Spring Boot configuration file that defines application settings as key-value pairs.
- rest apiA network-accessible service that exposes resources and operations according to REST constraints.
- servletA servlet is a Java object whose methods interact with a servlet container to process HTTP requests and produce responses.
- eager instantiationEager instantiation is the creation of an object or bean before it is explicitly requested, typically during container initialization.
- lazy initializationLazy instantiation is the creation of an object or bean only when it is first requested or otherwise needed.
- atomicityAtomicity is the transaction property that requires all operations in a transaction to succeed together or for none of their changes to take effect.
- web formAn HTML form is a browser interface element that collects user input and submits it to a server.
- adviceAdvice is aspect logic together with the execution timing at which that logic runs relative to an intercepted operation.
- code weavingWeaving is the process of combining aspect advice with target program components at selected execution points.
- pointcutA pointcut is a specification of the methods whose execution is intercepted for aspect application.
- execution chainAn execution chain is an ordered sequence in which multiple aspects and the intercepted method delegate execution to one another.
- execution orderExecution order is the sequence in which multiple aspects run when they intercept the same method.
- RESTREST is an architectural style for designing networked resources and their interactions through representations and standardized operations.
- business logicBusiness logic comprises the domain-specific rules and processes governing an application's core operations.
- immutabilityImmutability is the property that an object's state cannot be changed after initialization.
- Interface Segregation PrincipleInterface segregation is a design principle that favors several focused interfaces over one interface containing operations that clients do not need.
- JpaRepositoryJpaRepository is a Spring Data JPA repository interface that provides persistence operations for Jakarta Persistence API entities.
- Spring Data JDBCSpring Data JDBC is a Spring Data module that provides repository-based access to relational databases through JDBC.
- wiringWiring is the direct establishment of relationships between Spring-managed beans by calling the methods that create them.
- @EnableAspectJAutoProxy annotationThe @EnableAspectJAutoProxy annotation enables Spring's automatic proxy creation for AspectJ-style aspects.
- object-relational mapperAn ORM framework provides software for mapping application objects to relational database records and relationships.
- @lazy annotationThe @Lazy annotation is a Spring annotation that configures a bean for lazy instantiation.
- curlcURL is a command-line tool and library for transferring data using network protocols including HTTP.
- PostmanPostman is a software tool with a graphical interface for creating, sending, and inspecting HTTP requests and responses.
- regression testRegression testing is repeated testing of existing functionality to verify that code changes have not broken it.
- test classA test class is a class that groups automated test methods for related application behavior.
- test scenarioA test scenario is a distinct combination of conditions and inputs representing a way an application may behave that should be validated.
- testabilityTestability is the degree to which software can be tested effectively and efficiently.
- data inconsistencyA data inconsistency is a condition in which related stored or exchanged data does not agree or satisfy the application's consistency rules.
- database connectionA database connection is an active communication link between an application and a database server.
- database management systemA database management system (DBMS) is software for storing, retrieving, modifying, and managing data in databases.
- @getmappingThe @GetMapping annotation maps a Spring MVC method to HTTP GET requests for a specified path.
- @postmappingThe @PostMapping annotation maps a Spring MVC method to HTTP POST requests for a specified path.
- software testingThe systematic evaluation of software behavior against expected requirements or outcomes.
- rollbackA rollback is the operation that undoes a transaction's changes after the transaction cannot complete successfully.
- aspect-oriented programmingAspect-oriented programming is a programming technique that modularizes behavior applied across multiple program components, such as logging or transaction management.
- @RequestParam annotationThe @RequestParam annotation binds a Spring MVC controller method parameter to an HTTP request parameter.
- Apache TomcatTomcat is an open-source Java servlet container and web server that executes Java web components.
- HTTP headerAn HTTP header is a metadata field in an HTTP request or response that conveys information about the message or its handling.
- databaseA database is an organized collection of data stored for retrieval and management.
- HTTP requestAn HTTP request is a message sent by an HTTP client to request an operation or resource from a server.
- persistencePersistence is the retention of application data beyond the lifetime of the process that created it.
- exceptionAn exception signals an abnormal condition that can be thrown during execution and handled by a caller or interceptor.
- dependency injection containerAn IoC container creates and connects object instances according to configuration.
- HTTP PUT methodPUT is the HTTP method for creating or completely replacing the representation of a resource at a specified target URI.
- PATCHPATCH is the HTTP method for applying partial modifications to a resource.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.
