I have been committed to Android development. Since we three Android developers @ Lao CAI are not willing to go across the river and plan to develop Android App “The Most Beautiful Poetry” together, we need server-side interface support, so I started to write back-end code on a part-time basis, and also learned a little bit about JAVA backend. (Some simple introductory technical insights that are purely personal).

If you want to do good work, you must first sharpen its device, find a suitable and taste IDE for development, is the premise of serious technology, so here I think IntelliJ IDEA is a good choice, installation tutorial no longer say, their own Baidu or Google, This project uses SpringBoot as the overall framework (it configures many ways of using the framework by default). Personally, configuration is much simpler than SpringMvc. This article mainly discusses the framework integrated in the project and analyzes it from POm. XML (later articles will explain each technology in detail!! .


1, MySql:

JAVA requires this package to access the MySQL database through JDBC



2. Database operation:

In the following article referred to as JPA, I think it is exceptionally easy to use, the business layer contains an interface and an implementation; The persistence layer contains an interface, an implementation, and an entity class. Add a JPA configuration file and a test class. This article is structured as a Repository (interface), a Controller (implementation), and an entity class (Domain).



3. Data analysis (skipped, basic understanding) :

FastJson: Ali produced, absolutely boutique. (Domestic understand Java generally have used it)



Aop-related (here we focus on global request logging) :

In this section, logs such as method interception before and after Http requests and parameter verification are printed.



5. Redis cache:

Advantage:

1, high performance – Redis can read 110000 times /s, write speed is 81000 times /s.

2. Rich data types – Redis supports Strings, Lists, Hashes, Sets and Ordered Sets data types for binary cases.

Atomic – All Redis operations are atomic, and Redis also supports atomic execution after several operations are combined.

4. Rich features – Redis also supports publish/subscribe, notifications, key expiration, and more.



6. Template:

Spring Boot supports several template engines including:

  • FreeMarker
  • Groovy
  • Thymeleaf(official recommendation)
  • Mustache
Here’s Thymeleaf(official recommendation)

Spring-boot-starter-web dependencies can be removed because spring-boot-starter-thymeleaf contains these dependencies. The dependency on JSP can also be removed, since we have completely abandoned JSP.



Shiro Permission Framework:

Shiro is an open source Java security framework for permissions and Session management. It integrates Shiro to facilitate the use of sessions, and requires authentication and authorization before accessing interfaces to avoid malicious requests.



This article first gives a general description of the project, and then will break it down one by one for detailed interpretation. Finally, it will focus on the release of the project and deployment to the Linux server (a series of installation and configuration, many pits). If you like, you can pay attention to the project App “The Most Beautiful Poetry” which the three of us @Lao CAI refused to cross the River east.



App “the Most Beautiful Poetry” Android terminal source code Github address:

VinsonGuo/android-poetry

App “the most Beautiful Poetry” server source code Github address:

aicareles/Java-Poetry


App “The Most Beautiful Poetry” APK Cool Ann download address:

Most Beautiful Poetry (com.tech502.poetry) – 1.0 – application – kuan.com