Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Spring Boot #67

Closed
4 tasks done
OmerFarukBOUN opened this issue Apr 21, 2024 · 3 comments
Closed
4 tasks done

Install Spring Boot #67

OmerFarukBOUN opened this issue Apr 21, 2024 · 3 comments
Assignees
Labels
Action Item A specific task requiring attention Backend Dependent dependent to other issues Environment Setup
Milestone

Comments

@OmerFarukBOUN
Copy link
Contributor

OmerFarukBOUN commented Apr 21, 2024

ℹ️ Description

  • Download and install Spring Boot on your development device. You can look at this site.
  • Theme of the Action: Environment Setup
  • Estimation / Last Date: 21.04.2024 23:59

🎯 Tasks

  • Yusuf Kağan Çiçekdağ
  • Ömer Faruk Erzurumluoğlu
  • Melih Akpınar
  • Onur Kafkas
@OmerFarukBOUN OmerFarukBOUN added Dependent dependent to other issues Action Item A specific task requiring attention Backend Environment Setup labels Apr 21, 2024
@Pqrq
Copy link
Contributor

Pqrq commented Apr 21, 2024

Despite the entire suffering of mine, I have finally managed to run a basic Spring Boot Application :')

As some extra tips, I am not sure but the codes provided in the Spring-Getting Started site may not work properly (at least it was the case at my computer). My final working .xml and .java files with the proper file structure are as below:

pom.xml file:
--starts here--


4.0.0


4.0.0

<groupId>com.example</groupId>
<artifactId>myproject</artifactId>
<version>0.0.1-SNAPSHOT</version>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>3.2.5</version>
</parent>
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>3.2.5</version>
            <configuration>
                <mainClass>com.example.MyApplication</mainClass>
            </configuration>
        </plugin>
    </plugins>
</build>

--ends here--

MyApplication.java file:
--starts here--
package com.example;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@SpringBootApplication
public class MyApplication {

@RequestMapping("/")
String home() {
    return "Hello World!";
}

public static void main(String[] args) {
    SpringApplication.run(MyApplication.class, args);
}

}
--ends here--

File structure:

On top there is "Root folder" (you can name it however you want)
Under "Root Folder", there are pom.xml and src folder
Under src folder, there is main folder
Under main folder, there is java folder
Under java folder, there is com folder
Under com folder, there is example folder
Under example folder, there is MyApplication.java

Good luck :)

Important Note: Copy-pasting is not feasible when direcly done from the issue comment. For that, open "Edit Comment" and copy the code written there. There is an issue due to Markdown which we could not solve yet.

@gulsensabak gulsensabak added this to the Milestone 2 milestone Apr 21, 2024
@OmerFarukBOUN
Copy link
Contributor Author

Thanks to Yusuf Kağan, I was able to install it.

@SturmR
Copy link
Contributor

SturmR commented Apr 25, 2024

Spring boot installation complete.

@SturmR SturmR closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Action Item A specific task requiring attention Backend Dependent dependent to other issues Environment Setup
Projects
None yet
Development

No branches or pull requests

5 participants