In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly shows you "what are the SpringBoot development tools", the content is easy to understand, clear, hope to help you solve your doubts, the following let the editor lead you to study and learn what SpringBoot development tools have "this article.
1. SpringBoot Dedevtools
It is a tool that enables SpringBoot to support hot deployment. Here are the referenced methods
Or directly check the following configuration when creating the project:
Or add the following dependencies to the springBoot project:
Org.springframework.boot spring-boot-devtools true
After idea modifies the code, press ctrl + f9 to recompile it, which completes the hot deployment function.
Eclipse can be automatically compiled by pressing ctrl + s to save.
If you want to recompile the code as soon as you change it, you don't need to press ctrl+f9. Only the following actions are required:
First, type all the following ticks in the setting of idea
Enter pom.xml, give a cursor after the reverse label of build, and then press Alt+Shift+ctrl+/
Then check the following, and then restart idea.
II. Lombok
Lombok is a tool to simplify JavaBean development, so that developers do not need to write the constructor, getter,setter.
Lombok can be used by checking the following configuration during project initialization
Or import the following dependencies into the project:
Org.projectlombok lombok true
When using it, idea also needs to download the following plug-ins:
The following example of use
Import com.baomidou.mybatisplus.annotation.TableField;import com.baomidou.mybatisplus.annotation.TableName;import lombok.AllArgsConstructor;import lombok.Data;import lombok.NoArgsConstructor;@AllArgsConstructor// full parameter constructor @ NoArgsConstructor// no parameter constructor @ Data//getter + setterpublic class User {private Long id; private String name; private Integer age; private String email;} III, Spring Configuration Processor
The tool is to inject an open prompt into the attributes of the entity class, and I feel that the tool is not very meaningful!
Because there is attribute injection in SpringBoot, such as the following entity class:
Package org.lzl.HelloWorld.entity;import org.springframework.boot.context.properties.ConfigurationProperties;import org.springframework.stereotype.Component;/** * @ author Lenovo * * / @ Component@ConfigurationProperties (prefix = "mypet") public class Pet {private String nickName; private String strain; public String getNickName () {return nickName;} public void setNickName (String nickName) {this.nickName = nickName } public String getStrain () {return strain;} public void setStrain (String strain) {this.strain = strain;} @ Override public String toString () {return "Pet [nickName=" + nickName + ", strain=" + strain + "]";}}
We want to inject attributes into mypet in application.properties and application.yml without any hints. To solve this problem, check the following scenario when creating SpringBoot:
Or add the following dependencies directly to the project:
Org.springframework.boot spring-boot-configuration-processor true
And exclude the packaging of the tool from the build tag: (reduce the size of jar packages)
Org.springframework.boot spring-boot-maven-plugin org.springframework.boot spring-boot-configuration-processor This is all the content of the article "what are the SpringBoot development tools?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.