Click to follow the official account, Java dry goods will be delivered in time
There is no one of the strongest microservice frameworks in China!
Covers almost all Spring Boot operations!
2023 New Java Interview Questions (2500+)
As a plug-in for checking code specifications, CheckStyle can not only use the default given development specifications, such as Sun's and Google's development specifications, but also import plug-ins like Ali's development specifications.
In fact, each company has different requirements for development specifications, so most companies will specify their own check specifications, which can generally be achieved by importing a given checkstyle.xml file.
As a newcomer, I checkstyled the entire project, and it was miserable, so everyone should pay more attention to the code specification, and benefit others and yourself.
The landlord uses idea, so let’s talk about the import of the plug-in first, and then explain how to modify the non-standard code.
Import the CheckStyle plugin
1. File ——> setting install plugin
You can also download Ali's development specifications to see your personal needs and preferences.
2. Configure the plugin
3. Start C
Select the class you need to checkstyle and right-click:
Click checkstyle, because I imported from Alibaba, the button to use checkstyle is occupied, I am too lazy to do it, Ali is fine. To get the full version of "Ali Java Development Manual", please follow the official account Java core technology, reply: manual, you can get it.
or:
Reasons for reporting errors and how to deal with them
Principle: Change the code less, don't be blind and careless when dealing with it, and write more changes when submitting git.
In addition, if you are preparing for an interview to change jobs in the near future, it is recommended to use the Java interview library applet to write questions online, covering 2000+ Java interview questions, covering almost all mainstream technical interview questions.
1. The first category: annotation problems
Missing annotations, click on the question to jump to the place where the annotations are missing
The annotation is incomplete, just fill it up
Completion, each value of @ must be complete
2. Character placeholder problem
First set the code style according to your own needs
Then right click and select
can be solved
if tab problem
By default, tab=4 spaces, there is no tab, in fact, I will not, welcome to add.
See the name and know the meaning
It's ok to change as required
Just delete it
format problem
name problem
It is recommended to make less changes. If it is a public class, it will have a greater impact, so pay more attention in advance.
logical error
Import order
Similar to this situation, the order of importing packages does not follow the checkstyle specification. Under normal circumstances, the ctrl + shift + o shortcut keys of eclispe can solve this piracy problem, and the same is true for idea. Of course, you can also right-click to select
Copyright statement: This article is an original article of CSDN blogger "iXinRu", following the CC 4.0 BY-SA copyright agreement, please attach the original source link and this statement for reprinting. Original link: https://blog.csdn.net/iXinRu/article/details/85242553
If you want to learn Spring Boot systematically, I recommend my " Spring Boot Core Technology Course ", based on the latest 3.x version, covering almost all core knowledge points of Spring Boot , one-time payment, permanent learning...
Those who are interested scan the code to contact and subscribe to learn:
If you want to try/preview, add Brother R on WeChat
Add WeChat, please note: 399
Click to read the original text to get 2000+ interview questions!