Eclipse download and install configuration, maven configuration, jdk configuration, create springboot project, clone project, shortcut key

Eclipse download and install configuration, maven configuration, jdk configuration, create springboot project, clone project, shortcut key

Install

Official website: https://www.eclipse.org/downloads/
insert image description here

Enter the official website and click DownloadPackages
insert image description here

Choose the downloaded version according to your computer system, we generally choose the first one
insert image description here

Generally, it is not recommended to download the latest version directly. Here we take the 2021-06 version as an example, click to download
insert image description here

Choose the right version for your system
insert image description here

After the download is complete
, enter the decompression directory and double-click the exe file to start the installation
insert image description here

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
insert image description here

Check it, then close this page directly, and the installation is complete.
insert image description here

Eclipse configuration maven

Right-click the window and select Preferences

insert image description here

Find maven and click it, or directly search for maven in the search box, and then click user settings to configure maven.
insert image description here

Jdk configuration

Right-click the window and select Preferences

insert image description here

Click Java, then click Installed JREs, and click Add.
insert image description here

Select Standard VM and click Next.

insert image description here

Click Directory, then find the installation path of jdk and select it, and finally click Finish.
insert image description here

Check the jdk just added, click Apply, and click Apply and Close to complete the configuration.
insert image description here

The Complier under Java can modify the version of jdk.
insert image description here

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 按钮。操作如下图:

insert image description here

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 按钮

insert image description here

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 按钮。操作如下图:

insert image description here

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:
insert image description here

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.
insert image description here

Go to Eclipse
File --> Import
insert image description here

Click the second one under Git, then click next
insert image description here

Select the second Clone URL, click next

insert image description here

Enter the URL you just copied, click next, and a pop-up box may pop up, just enter the GitLab account password.
insert image description here

click next
insert image description here

You can modify the location where the code is stored, and then click next
insert image description here

Wait for the import to complete, click Finish, then it starts to import the jar package, just wait for the import to complete.
insert image description here

Eclipse creates a springboot project

Help -->Eclipse Marketplace
insert image description here

Enter Spring Tools in the search box to find the plugin and click Install to install
insert image description here

click confirm
insert image description here

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. . .
insert image description here

A warning window may pop up, just click Install anyway
insert image description here

After completion, click Restart Now to restart Eclipse
insert image description here

Click File–>New–>Project

insert image description here

Find springboot, select the second one and click next

insert image description here

Give a name, then select the java version, and click next
insert image description here

Select the required dependencies, click finish, and then come to the waiting stage.
insert image description here

run
insert image description here

When this thing appears, it means the creation is successful.
insert image description here

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

Guess you like

Origin blog.csdn.net/a26689/article/details/126055573