What are the ways to create springboot projects in eclipse
May 22, 2023 pm 07:19 PMMethod 1
Install STS plug-in
New spring boot project
Project Start
1.Create Maven project
2.Select project type
3.Select project
4. Write the project group and name -finish
##5. Modify the pom.xml file
<!-- spring boot基本环境 --> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0.2.RELEASE</version> </parent>
6.Add dependencies in pom.xml
<!--web应用基本环境配置 --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency>
7.Add compilation plug-in in pom.xml
<build> <plugins> <!-- spring-boot-maven-plugin插件就是打包spring boot应用的 --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins </build>
8. Basic packages and classes
9. Create resources folder and application.properties file
10.App.java
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); } }
11.HelloController.java
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"; } }
12. Start the project
13. Access the project (lower versions may not be accessible, version 2 is available)
Method 3
Visit http://start.spring.io/
Click Generate Project to download the project compressed package
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!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Why can't eclipse import the project?

How to adjust background color settings in Eclipse

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

What are the eclipse decompilation plug-ins?

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

Secret method and quick solution to solve Eclipse failure to start

How to customize shortcut key settings in Eclipse

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