Java electricity supplier payment system hands-realization (three) - SpringBoot build applications

1 version of the software to be aligned

  • java
  • Intellij IDEA Ultimate
  • Maven
  • SpringBoot
    2.1.7 (absolutely necessary)

2 New Application

  • Make sure your normal scientific means of access

  • Only modified within the scope of the sign

  • Sb attention may not find the version number 2.1.7, the first default, after another change, currently only check the Spring Web

  • Configured as a local path maven

  • Revised to version 2.1.7

  • IDEA (development is the process)

  • Java Command (Deployment is the final result & debugging)

3 MyBatis VS PSD

  • JPA is the trend

  • Mybatis is the status of domestic

  • Version correspondence tableHere Insert Picture Description

  • Maven installation

  • Mybatis just persistence layer framework, we also need to connect to database database-driven, do not need to pay attention to the specified version, sb starer good version has been specified

  • Then, naturally the configuration database

  • New pojo package

  • New dao layer

  • Test unit not forget

  • Database field values

  • However, we have to check is null field

  • Because Java hump name, and the database name is underlined division, resulting in a mismatch, but fortunately for us has been resolved mybatis

  • There is value it!

  • If there are a lot mapper class, it does not explicitly require each comment @Mapper, add annotations in the Scan category to start

xml statement

  • Note that the specified file path mapper
Published 347 original articles · won praise 180 · views 160 000 +

Guess you like

Origin blog.csdn.net/qq_33589510/article/details/104081713