[mybatis basic study notes extra chapter] How to create a new template under idea

1. Scenario

When creating a new mybatis project, it is too troublesome to configure mybatis-config.xml, userMapper.xml, and userMapper every time. So we can create new templates to simplify the process.

2. New template process

<1> Create a new template

File->settings->code and templates, and click the plus sign in the upper left corner +
insert image description here
insert image description here
insert image description here

<2> Fill in the template

insert image description here
1. Template name, fill in mybatis-config
2. Extension name, fill in xml
3. Template content, fill in the content of mybatis-config, remove some unique parameters to become a general template

<3> Try to create a new core configuration file using a template

insert image description here
insert image description here
insert image description here
Successfully created! ! !

Guess you like

Origin blog.csdn.net/qq_45486709/article/details/123268037