Table of Contents
Method 1
Install STS plug-in
Home Java javaTutorial What are the ways to create springboot projects in eclipse

What are the ways to create springboot projects in eclipse

May 22, 2023 pm 07:19 PM
eclipse springboot

Method 1

Install STS plug-in

What are the ways to create springboot projects in eclipse

What are the ways to create springboot projects in eclipse

## After the installation of the plug-in guide window is completed, the progress of installing the plug-in will appear in the lower right corner of eclipse. After the plug-in installation is completed, restart eclipse to take effect.

New spring boot project

What are the ways to create springboot projects in eclipse

What are the ways to create springboot projects in eclipse

Project Start

What are the ways to create springboot projects in eclipse

##Method 2

1.Create Maven project

What are the ways to create springboot projects in eclipse2.Select project type

What are the ways to create springboot projects in eclipse3.Select project

What are the ways to create springboot projects in eclipse4. Write the project group and name -finish

##5. Modify the pom.xml fileWhat are the ways to create springboot projects in eclipse

<!-- spring boot基本环境 -->
<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.0.2.RELEASE</version>
</parent>
Copy after login

6.Add dependencies in pom.xmlWhat are the ways to create springboot projects in eclipse

<!--web应用基本环境配置 -->
<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>
Copy after login

7.Add compilation plug-in in pom.xmlWhat are the ways to create springboot projects in eclipse

<build>
    <plugins>
    <!-- spring-boot-maven-plugin插件就是打包spring boot应用的 -->
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins
</build>
Copy after login

8. Basic packages and classesWhat are the ways to create springboot projects in eclipse

9. Create resources folder and application.properties fileWhat are the ways to create springboot projects in eclipse

10.App.javaWhat are the ways to create springboot projects in eclipse

package com.springboot.springbootDemo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class App
{
    public static void main( String[] args )
    {
        SpringApplication.run(App.class, args);
    }
}
Copy after login

11.HelloController.javaWhat are the ways to create springboot projects in eclipse

package com.springboot.springbootDemo.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("hello2")
public class HelloController {
       @RequestMapping("")
       public String hello() {
              return "helloworld2";
       }
}
Copy after login

12. Start the projectWhat are the ways to create springboot projects in eclipse

13. Access the project (lower versions may not be accessible, version 2 is available)What are the ways to create springboot projects in eclipse

http://localhost:8012/hello2

What are the ways to create springboot projects in eclipseMethod 3

Visit http://start.spring.io/

Click Generate Project to download the project compressed packageWhat are the ways to create springboot projects in eclipse

After decompressing, use eclipse, Import -> Existing Maven Projects -> Next ->Select the decompressed folder- > Finsh, OK done!

The above is the detailed content of What are the ways to create springboot projects in eclipse. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Why can't eclipse import the project? Why can't eclipse import the project? Jan 05, 2024 am 11:50 AM

Why can't eclipse import the project?

How to adjust background color settings in Eclipse How to adjust background color settings in Eclipse Jan 28, 2024 am 09:08 AM

How to adjust background color settings in Eclipse

Pro Guidance: Expert advice and steps on how to successfully install the Eclipse Lombok plug-in Pro Guidance: Expert advice and steps on how to successfully install the Eclipse Lombok plug-in Jan 28, 2024 am 09:15 AM

Pro Guidance: Expert advice and steps on how to successfully install the Eclipse Lombok plug-in

What are the eclipse decompilation plug-ins? What are the eclipse decompilation plug-ins? Jan 04, 2024 pm 02:21 PM

What are the eclipse decompilation plug-ins?

Revealing solutions to Eclipse code running problems: helping you troubleshoot various running errors Revealing solutions to Eclipse code running problems: helping you troubleshoot various running errors Jan 28, 2024 am 09:22 AM

Revealing solutions to Eclipse code running problems: helping you troubleshoot various running errors

Secret method and quick solution to solve Eclipse failure to start Secret method and quick solution to solve Eclipse failure to start Jan 03, 2024 pm 01:01 PM

Secret method and quick solution to solve Eclipse failure to start

How to customize shortcut key settings in Eclipse How to customize shortcut key settings in Eclipse Jan 28, 2024 am 10:01 AM

How to customize shortcut key settings in Eclipse

Step-by-step guide to changing background color with Eclipse Step-by-step guide to changing background color with Eclipse Jan 28, 2024 am 08:28 AM

Step-by-step guide to changing background color with Eclipse

See all articles