Spring Boot + MyBatis framework learning record impression

Title

"The road is long and long, I will search up and down."

Content

Respect the original author, the link to the learning tutorial of this article is: Spring Boot Framework Introduction Series , thanks to the technical staff who have contributed to the open source community, let me write down my thoughts about following this project, and complaints.

Editor IDEA

"The sharpest sword is only swung for the strongest hand", this sentence comes from the mobile game "Glory of the King", which is said by a hero in vain. In many code editors, this sentence is used to praise the IDEA editor, it is not too much. Okay, no more circles. IDEA, or Java, was once nicknamed "configuration area" by .NET developers. I haven't started using IDEA to write code yet. Downloading, configuring, installing and creating a new program that can run took roughly two days. Errors continued. "Invalid" is the most common type of error, huh, anyway, I wrote it down on a small notebook, and there is a big backer behind it—Baidu is there. Various errors come here. I think it’s a waste of time to write out the details of every error here, and it does not conform to the design philosophy of "high cohesion and low coupling" in software design. The bugs of the entire project will be sorted out separately later.
The IDEA editor is troublesome. What follows is that it is powerful. After a long time of hard work, it is just a basic environment (no more complaints). Compared with the previously used Visual studio 2017 editor, this is still slightly weaker. First of all, compared to Eclipse, the interface is good-looking, and the code hints are sufficient (turn back to configure the eclipse environment and use it later); secondly, there are many shortcut keys, this feature also exists in the WebStorm editor, and there are rich shortcut keys In the end, the development efficiency is improved invisibly; in the end, this editor is difficult to serve, and the downloaded Maven tool is bound by itself, and the default configuration can report errors, and it is also served. I disliked the slow file download speed, so I went to Baidu online, then modified the settings.xml of Maven, and added an alimaven mirror.


ORM tool MyBatis

There is nothing to explain. The Java open source community has already said that this is a lightweight ORM tool that is most suitable for building small programs. However, I used EntityFramework as a medium-sized ORM tool in .NET development before, but DAO has all been established. However, in this project, the CodeFirst mode was not adopted, nor was it ModelFirst. Instead, SQL scripts were used to generate database tables. Then, ModelConfig did not isolate, but used the small and flexible Annotations for mapping and mapping, which means that small projects can be developed. After doing this, Annotations is inconvenient to maintain after the project is large, and the scalability is not good.
SpringBoot is an IOC (Controlled Dependency Inversion) that simplifies configuration. It is also a DI tool and a dependency injection tool. The design pattern of this framework is the closest to the factory pattern, which can realize automatic assembly. For the same type of framework, after VS is Nuget, there is basically no need for configuration files, and framework dependencies are automatically introduced. Alas, VS has eaten too much syntactic sugar. Now the Java configuration files are not suitable for people. Look optimistically, and I have a better understanding of the assembly process of a project.
In the future, I will write less important knowledge, write down the problems that I thought about at the time, and look up and solve them slowly the next morning. Like the big night now, I already feel that I have a little spare but not enough energy. The internship day is also very tiring.
For this project, unless it is a particularly troublesome code, I typed out the general code myself, and the pasting and copying were too fast, and I couldn't understand it.


I will add it slowly in the future, so I will write so much now.

Guess you like

Origin blog.csdn.net/qq_37040173/article/details/81292015