Eclipse download and install configuration, maven configuration, jdk configuration, create springboot project, clone project, shortcut key
Eclipse configuration directory
- **Eclipse download and install configuration, maven configuration, jdk configuration, create springboot project, clone project, shortcut keys**
- Install
- Eclipse configuration maven
- Jdk configuration
- Modify the Eclipse default workspace encoding set, the default encoding set is GBK, change it to UTF-8
- Modify the resource file encoding set of Eclipse and modify it to UTF-8
- Set content auto-reminder
- Modify Eclipse default browser
- clone project from GitLab
- Eclipse creates a springboot project
- Common Shortcut Keys in Eclipse
Install
Official website: https://www.eclipse.org/downloads/
Enter the official website and click DownloadPackages
Choose the downloaded version according to your computer system, we generally choose the first one
Generally, it is not recommended to download the latest version directly. Here we take the 2021-06 version as an example, click to download
Choose the right version for your system
After the download is complete
, enter the decompression directory and double-click the exe file to start the installation
Choose the place where the code is stored, it is recommended not to put it in the c drive, and then check 2, so that this window will not pop up every time you open it in the future
Check it, then close this page directly, and the installation is complete.
Eclipse configuration maven
Right-click the window and select Preferences
Find maven and click it, or directly search for maven in the search box, and then click user settings to configure maven.
Jdk configuration
Right-click the window and select Preferences
Click Java, then click Installed JREs, and click Add.
Select Standard VM and click Next.
Click Directory, then find the installation path of jdk and select it, and finally click Finish.
Check the jdk just added, click Apply, and click Apply and Close to complete the configuration.
The Complier under Java can modify the version of jdk.
Modify the Eclipse default workspace encoding set, the default encoding set is GBK, change it to UTF-8
一、找到 Window → Preferences,在左上角的输入框中输入Workspace,找到第二个Workspace,修改编码集为 UTF-8,最后点击Apply and Close 按钮。操作如下图:
Modify the resource file encoding set of Eclipse and modify it to UTF-8
一、找到 Window → Preferences,在左上角的输入框中输入Content Types,找到General → Content Types,并点击打开Content Types:中的Text,在下面的Default encoding输入框中输入UTF-8,并点击Apply and Close 按钮
Set content auto-reminder
By default in Eclipse, when the dot (ie.) is pressed, the content will be automatically prompted. Now, in addition to pressing the dot, the upper and lower case of any letter will have content automatically prompted.
一、找到 Window → Preferences,在左上角的输入框中输入Content Assist,找到Java → Editor → Content Assist,在Auto activation triggers for java对应的输入框中输入 .qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM,最后点击Apply and Close 按钮。操作如下图:
Modify Eclipse default browser
The web program runs by default using the browser that comes with Eclipse, and modify it to use an external browser, such as: Firefox, Google
1. Find Window → Preferences, enter Web Browser in the input box in the upper left corner, find General → Web Browser, and select it by default It is Use internal web browser, we modify the selection of Use external web browser, check your favorite browser in External web browsers, I checked Chrome here, and finally click the Apply and Close button. Of course, you can also click new to add your favorite browser, the operation is as follows:
clone project from GitLab
Go to the GitLab page and find the project you want to clone, click clone and then select the second click to copy the URL.
Go to Eclipse
File --> Import
Click the second one under Git, then click next
Select the second Clone URL, click next
Enter the URL you just copied, click next, and a pop-up box may pop up, just enter the GitLab account password.
click next
You can modify the location where the code is stored, and then click next
Wait for the import to complete, click Finish, then it starts to import the jar package, just wait for the import to complete.
Eclipse creates a springboot project
Help -->Eclipse Marketplace
Enter Spring Tools in the search box to find the plugin and click Install to install
click confirm
Select I accept, then click finish, and then wait for the jar package to be imported, it may take a long time, so wait patiently. . .
A warning window may pop up, just click Install anyway
After completion, click Restart Now to restart Eclipse
Click File–>New–>Project
Find springboot, select the second one and click next
Give a name, then select the java version, and click next
Select the required dependencies, click finish, and then come to the waiting stage.
run
When this thing appears, it means the creation is successful.
Common Shortcut Keys in Eclipse
- 1. Complement code statement: alt + /
- 2. Quick fix: ctrl + 1
- 3. Use single-line comments: ctrl + /
- 4. Use multi-line comments: ctrl + shift + /
- 5. Cancel multi-line comments: ctrl + shift + \
- 6. Copy the code of the specified line: ctrl + alt + down or ctrl + alt + up
- 7. Delete the code of the specified line: ctrl + d
- 8. Move the code up and down: alt + up or alt + down
- 9. Switch to the next line of code space: shift + enter
- 10. Switch to the previous line of code space: ctrl + shift + enter
- 11. How to view the source code: ctrl + select the specified structure or ctrl + shift + t
- 12. Return to the previous edited page: alt + left
- 13. Go to the next edit page (for the one above): alt + right
- 14. Select the specified class with the cursor to view the inheritance tree structure: ctrl + t
- 15. Copy code: ctrl + c
- 16. Undo: ctrl + z
- 17. Undo: ctrl + y
- 18. Cut: ctrl + x
- 19. Paste: ctrl + v
- 20. Save: ctrl + s
- 21. Select all: ctrl + a
- 22. Format code: ctrl + shift + f
- 23. Select several lines and move backward as a whole: tab
- 24. Select several lines and move forward as a whole: shift + tab
- 25. In the current class, display the class structure, and support searching for specified methods, attributes, etc.: ctrl + o
- 26. Modify the specified variable name, method name, class name, etc. in batches: alt + shift + r
- 27. Switch the case of the selected structure: change to uppercase: ctrl + shift + x
- 28. Switch the case of the selected structure: change to lower case: ctrl + shift + y
- 29. Batch import package: ctrl + shift + o
- 30. Call out structures such as getter/setter/constructor: alt + shift + s
- 31. Display the properties of the currently selected resource (project or file): alt + enter
- 32. Quick search: refer to the selected Word to quickly navigate to the next one: ctrl + k
- 33. Close the current window: ctrl + w
- 34. Close all windows: ctrl + shift + w
- 35. View where the specified structure has been used: ctrl + alt + g
- 36. Find and replace: ctrl + f
- 37. Maximize the current View: ctrl + m
- 38. Position directly to the first position of the current line: home
- 39. Position directly to the end of the current line: end