Spring boot + mybatis + orcale implementation steps example code explanation
•
Java
After the last implementation, add mybatis to query the orcale database
Step 1: create several necessary packages. The results are as follows
Step 2: create a new personservice under the service package Java looks up the person method interface according to the name
Step 3: create a new personserviceimpl. Under the serviceimpl package Java implements personservice Java interface
Step 4: create a new personmapperdao.com under persondao Java has a method to query person
Step 5: create a new personmapper under resource xml
Step 6: in application Add data source, mapper file path and entity path in properties
Step 7: add dependency in POM file
Step 8: Browser input http://localhost:8080/person/show?name=zhang
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码