Spring primer for not regret
If you're holding this book right now, you may be planning to develop with Spring.
I also read a series of books when developing with Spring. However, none were satisfied. The reason is as follows.
- In other books, there is no sample code that can be executed, so we do not know the actual usage.
Some books may be explained like a dictionary.For example, if you write such code, you can execute the SELECT statement.
We also need such a book. However, when We try to execute it, sometimes We don't know how to execute it.Because even if you execute the code of the select statement, you have to make various settings before that.
You can easily try it if you are operating a database. However, there are some features that are difficult to try.When you try it, there are unexpected pitfalls. Therefore, trial and error will be repeated.
There are things We would like to do other than work, but this is a waste of time.
- Even if there is a sample, it is too easy to use in actual development.
To understand the code, it's better to be simple at first. However, the level required for actual development is beyond that.
It is possible to develop only after learning the application level.
- It haven't explained everything about Spring.
Spring is a very large framework. The framework is divided according to some functions.For example, there are many frameworks such as Spring Security for security and Spring Boot for web application development.
Unfortunately, when I read the Spring Boot Primer, It sometimes mention only Spring Boot. In order to develop a full-scale Web application, you cannot develop unless you know Spring Security, DB operation, etc. in addition to Spring Boot.
Eventually, You would have to buy other books.
- The explanation of DI (Dependency Injection) is very difficult to understand
It's very disappointing, but the explanation of DI (Dependency Injection) can be difficult to understand in other books.
DI (Dependency Injection) is the core function of Spring. If you can't use this, there's no point in using Spring.
Since Spring has so many functions, it is not possible to explain all in one book. However, if you learn it step by step, you can quickly reach the level where actual development is possible.
Therefore, in this book, you will actually create a Web application. By doing so, you can experience hands-on learning of practical web application development.
In addition, this book has the following features.
With efficient learning, you can learn Spring in a week!
There are various effective learning methods. Among them, actually trying is one of the effective ways to learn.It is scientifically known that knowledge can be acquired by not only inputting but also outputting.
Also, there are other benefits to actually trying it out.
It means gaining confidence. What it means is that everyone's first time is scary. When I run the program for the first time, I am worried that it will work properly. Even if it works, I'm wondering if there are any bugs.At least I am.
If you have experienced it even once, you will gain confidence. From the next time, you should feel no problem because you did it once.
Also, the sample code created in this book is made assuming actual development.
Therefore, if you refer to and reuse the completed code, you should be able to use it immediately.
If you do so, you will be able to enjoy after five without overtime work.
Also, the sample code created in this book is made assuming actual development. Therefore, if you refer to and reuse the completed code, you should be able to use it immediately.If you do so, you will be able to enjoy after five without overtime work .
Since one Web application is created, this book is structured to read in order.For example, input check first, then AOP, DB operation, etc., gradually adding functions.
Therefore, we recommend that you read this book in order from Chapter 1.
If you're busy, you can download the sample code at the beginning and end of each chapter.By doing this, you can actually create the code even from the middle.
In pursuit of easy understanding!
In this book, the following measures are taken to make it easier to understand.
- Include many illustrations
The ease of understanding will change depending on whether or not there is a diagram when explaining. I myself am a type of person who is hard to understand without a diagram, so I have included many illustrations to make it easier to understand .
- Step by step
When to tell or teach something, you may not care must be taken.
That is to convey one thing. It is said a lot of things at once, it will be tangled the head. At least, I will become so.
In particular, books can only be described by letters and figures. Therefore, it becomes even more important.Therefore, in this book, there is only one thing to convey at a time.
The explanation and code will be longer, but it should be much easier to understand .
- Clarify goals by explaining in advance
Before actually creating the sample code, I will explain what you will create.For example, add search condition input items to search from the database.
Ask them to create it after explaining it on the screen image etc. (Of course, you can just read it).
The reason for doing this is because it's easier to understand.
If you don't know your goals, it will be difficult to understand. On the other hand, it is better to make it with the goal known.
Also, I'm putting a lot of effort into the explanation of DI (Dependency Injection).
I found out about DI on the Internet and read other books many times, and finally I understood.Therefore, it became clear why the explanation of DI was difficult to understand in other books.
This is because other books are for advanced Java users and experienced Spring users.
Therefore, in this book, DI (Dependency Injection) is explained from the level that even a Java beginner can understand . Of course, even advanced Java users and people with Spring experience can understand it.
Target audience
It is recommended that you have the following knowledge to read this book.
To the end, you only need to learn how to use the framework tool, so a basic level is enough. Rest assured that you can continue reading this document if you have knowledge of Java.
Application configuration
The Web application developed in this book is made with the following configuration.
- Spring: version 5
- SpringBoot: 2.3.1
- DB: H2
It is configured to add Spring security, JDBC, Mybatis, etc. as needed.
Because it is an electronic book
This document is provided as an electronic book only.Since the paper is flippable, it has the advantage that you can easily find the desired page.In consideration of that point, many links to each page are attached in this book.
So you can quickly find the page you want .
The more volume a book has, the more expensive it will be.However, this book has a volume equal to or higher than that of other books, but at a lower price.
It is a price that can be done only because it is an electronic book.
However, I recommend browsing on a tablet device to make the code easier to read.
Let's try this book.
Table of Contents
Landmarks
Chapter1. Overview of Spring
This chapter gives a brief overview of Spring. Since this book focuses on learning through practice, the explanation is limited to simple contents. If you are interested in the history of Spring, please refer to other books and the Internet.