Sign inSign up

openeuler/spring-boot

Sponsored OSS

By openeuler

Updated 2 months ago

Image
0

6.2K

openeuler/spring-boot repository overview

Quick reference

Spring Boot | openEuler

Current Spring Boot docker images are built on the openEuler. This repository is free to use and exempted from per-user rate limits.

Spring Boot is an open-source, opinionated Java framework designed to simplify the development of standalone, production-grade Spring-based applications. It extends the Spring Framework by providing features that streamline and accelerate the development process, particularly for microservices and web application

Learn more on Spring Boot Website⁠.

The tag of each spring-boot docker image is consist of the version of spring-boot and the version of basic image. The details are as follows

TagCurrentlyArchitectures
4.0.2-oe2403sp4spring 4.0.2 on openEuler 24.03-LTS-SP4amd64, arm64
4.0.2-oe2403sp3spring 4.0.2 on openEuler 24.03-LTS-SP3amd64, arm64
3.5.7-oe2403sp2spring 3.5.7 on openEuler 24.03-LTS-SP2amd64, arm64
3.4.4-oe2403sp1Spring Boot 3.4.4 on openEuler 24.03-LTS-SP1amd64, arm64
3.5.4-oe2403sp2Spring Boot 3.5.4 on openEuler 24.03-LTS-SP2amd64, arm64

Usage

In this usage, users can select the corresponding {Version} based on their requirements.

  • Add Spring Boot to your project

    Using Maven:

    Add the spring-boot-starter-parent and a starter dependency to your pom.xml:

    <parent>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-parent</artifactId>
      <version>${Version}</version> <!-- Replace with latest -->
    </parent>
    
    <dependencies>
      <!-- Spring Boot Web Starter -->
      <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
      </dependency>
    </dependencies>
    

    Using Gradle:

    plugins {
      id 'org.springframework.boot' version '${Version}'
    }
    
    dependencies {
      implementation 'org.springframework.boot:spring-boot-starter-web'
    }
    
  • Create an Application class

    Create a simple application class with a main method:

    package com.example;
    
    import org.spring-boot.*;
    import org.spring-boot.impl.StdSchedulerFactory;
    
    package com.spring.boot;
    
    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;
    import org.springframework.web.bind.annotation.*;
    
    @SpringBootApplication
    @RestController
    public class Application {
    
        @RequestMapping("/")
        public String home() {
            return "Hello World!";
        }
    
        public static void main(String[] args) {
            SpringApplication.run(Application.class, args);
        }
    }
    
  • Run the application

    Run your application from your IDE or with maven:

    ./mvnw spring-boot:run
    

    Or with Gradle:

    ./gradlew bootRun
    

    Open your website and visit: http://localhost:8080/, you should see:

    Hello World!
    

Question and answering

If you have any questions or want to use some special features, please submit an issue or a pull request on openeuler-docker-images.

Tag summary

Content type

Image

Digest

sha256:7b8b5b67a

Size

281.4 MB

Last updated

2 months ago

docker pull openeuler/spring-boot

This week's pulls

Pulls:

11

Sep 7 to Sep 13