Zum Hauptinhalt springen
ProdukteDesktop-WerkzeugeTASTECADZeichnungsprüfungTASTEFILESDateiverwaltungTASTEFTPDateiübertragungTASTESSHRemote-ArbeitsbereichTASTEZIPKomprimieren und EntpackenTASTEWINMDateiverwaltungEntwicklerwerkzeugeTASTECODEIntegrierte Entwicklungsumgebung für RustTASTESTUDIOIntegrierte Entwicklungs- und TestumgebungTASTEETLDatenintegration (ETL)ServerTASTEREMOTERemote-Desktop-ServerTASTEGEOGeodatenserverTASTEMAILE-Mail-ArbeitsbereichInvestierenTASTESTOCKDesktop-App für automatischen AktienhandelErste SchritteDownloadsDokumentationKaufenAlle Produkte
Marktplatz
Neuigkeiten
TechnikNeuigkeitenEntwickler-News von heuteEntwicklerdokuProgrammiersprachenRustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDartWeb-Frontend-FrameworksNext.jsReactVue.js · NuxtSvelteKitAngularServer-FrameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · ExpressApp- & Desktop-FrameworksTauriFlutterReact NativeElectronAlgorithmenAlgorithmus-GrundlagenKernalgorithmenFortgeschrittene AlgorithmenAlgorithmen für die Praxis
CommunityProjekteEntwicklungslogsPromptsProbleme mit KI-ToolsShowcaseCommunity-Leitfaden
ZusammenarbeitWissenstransferWebsite-AufbauDesktop-App-AufbauRelease- und ZahlungspipelineVertriebspartnerKontakt
DiensteRemote-DesktopIndividuelle Installationspakete
TASTEDEV
Produkte

Desktop-Werkzeuge

TASTECADKomplexe Zeichnungen, mühelos geöffnetTASTEFILESNur die Dateien, die zählen – in BestzeitTASTEFTPDer aufgeräumteste Weg für Ihre DateienTASTESSHDie stärkere Verbindung zu Ihren ServernTASTEZIPSchneller packen, sicherer entpackenTASTEWINMEin tastaturorientierter Dateimanager mit zwei Fenstern

Entwicklerwerkzeuge

TASTECODERust-Apps bearbeiten, bauen, debuggen und testen – alles in einem FensterTASTESTUDIOVom Bearbeiten bis zu Remote-Tests und freigegebenen KI-KorrekturenTASTEETLDaten bewegen, die Werte im Blick

Server

TASTEREMOTEEin Remote-Desktop auf Ihrem eigenen ServerTASTEGEOEin GeoServer-kompatibler Geodatenserver, neu aufgebaut in RustTASTEMAILIhre E-Mail wieder in Ihrer Hand

Investieren

TASTESTOCKAutomatischer Aktienhandel nach Ihren Regeln: wann und was

Erste Schritte

DownloadsNeueste Versionen aller ProdukteDokuSo nutzen Sie jedes ProduktKaufenAbos und DauerlizenzenAlle ProdukteAlle Produkte im Überblick
Alle Produkte
MarktplatzNeuigkeiten
Technik

Neuigkeiten

Entwickler-News von heuteOffizielle Meldungen zu Sprachen, Frameworks, GitHub und KIEntwicklerdokuAnleitungen zu Sprachen, Frameworks und Algorithmen

Programmiersprachen

RustTypeScriptJavaScriptPythonGoC#JavaCC++KotlinDart

Frameworks

Web-Frontend-FrameworksNext.jsReactVue.js · NuxtSvelteKitAngular
Server-FrameworksSpring BootDjangoFastAPIASP.NET CoreNestJS · Express
App- & Desktop-FrameworksTauriFlutterReact NativeElectron

Algorithmen

Algorithmus-GrundlagenKomplexitätsanalyse · Sortieren · Suchen · Grundlegende Datenstrukturen · Bäume und HeapsKernalgorithmenGraphtraversierung · Kürzeste Wege und minimale Spannbäume · Dynamische Programmierung · Greedy-Algorithmen · Teile und herrsche · BacktrackingFortgeschrittene AlgorithmenZeichenkettenalgorithmen · Mathematik und Zahlentheorie · Bitmanipulation · Segmentbäume · Union-FindAlgorithmen für die PraxisStrategie für Coding-Interviews · LRU-Cache · Rate Limiting · Konsistentes Hashing
Alle Entwicklungsdokumente
Community
ProjekteEntwickler und Projekte entdeckenEntwicklungslogsEntscheidungen und ErkenntnissePromptsWiederverwendbare AnweisungenProbleme mit KI-ToolsProbleme und Workarounds für Claude, Codex, GeminiShowcaseFertige ErgebnisseCommunity-LeitfadenWie wir offen entwickeln
Zusammenarbeit
WissenstransferNative Apps mit Rust und eguiWebsite-Aufbau10 Sprachen, Konten, Dokumentation und DownloadsDesktop-App-AufbauRust und egui, ohne WebViewRelease- und ZahlungspipelineSignatur, MSI, deb, rpm, AppImage, PrüfsummenVertriebspartnerEmpfehlen und 30 % erhaltenKontaktEntwicklung, Partnerschaft, Investition
Dienste
Remote-DesktopIhren Computer im Browser erreichenIndividuelle InstallationspaketeNur nötige Funktionen, Einstellungen vorab
Kaufen
DE
한국어EnglishDeutschEspañolFrançaisItalianoPortuguês (Brasil)日本語简体中文繁體中文
Anmelden
Anmelden
TASTEDEV

Von kleinen Werkzeugen zu besserer Entwicklung.

support@tastedev.netTASTEDEV unterstützen
ProdukteProduktübersichtKaufenDokuDownloadsMarktplatzSupport
CommunityProjekteEntwicklungslogsPromptsProbleme mit KI-ToolsShowcase
RichtlinienÜber unsDatenschutzerklärungNutzungsbedingungenAbo-BedingungenRückerstattungCommunity-Richtlinien
KontoAnmeldenRegistrieren
Besucher
Heute
Gestern
Aufrufe gesamt
Firma
GXSOFT
Vertretungsberechtigt
CHOI YOUNG GU
Handelsregisternummer
853-44-00368
Anschrift
9F V24, 351 Gyeongin-ro, Michuhol-gu, Incheon, Republic of Korea
Telefon
+82-10-4404-1523
E-Mail
whitecalvin@tastedev.net
Datenschutzbeauftragter
CHOI YOUNG GU

© 2026 TASTEDEVProduktinformationen basieren auf verifizierten Entwicklungsquellen.Veröffentlicht · wird verbessert

Spring Boot-Dokumentation
Spring Boot
Getting Started with Spring BootProject Structure and ConfigurationCore ConceptsData and StateTestingDeployment
Diskussionen

Spring Boot-Anleitung · 3/6

Core Concepts

Dieses Kapitel ist vorerst nur auf Englisch verfügbar.

Spring Boot runs on top of the Spring Framework. Spring's IoC container creates your objects and wires them together, and Spring Boot adds starters and auto-configuration so that most of the setup disappears. This chapter covers beans and dependency injection, auto-configuration, starters, the web layer and type-safe configuration.

Beans and dependency injection

An object managed by the container is called a bean. Annotate a class with a stereotype and component scanning registers it:

AnnotationPurpose
@ComponentGeneral-purpose component
@ServiceBusiness logic
@RepositoryData access; translates persistence exceptions
@Controller / @RestControllerWeb request handling

When a bean needs another bean, take it through constructor injection. With a single constructor, @Autowired is unnecessary, and final fields make the class easy to create by hand in tests.

@Service
public class GreetingService {

    private final Clock clock;

    public GreetingService(Clock clock) {
        this.clock = clock;
    }

    public String greet(String name) {
        int hour = LocalTime.now(clock).getHour();
        return (hour < 12 ? "Good morning, " : "Hello, ") + name;
    }
}

For objects you cannot annotate, such as library classes, declare a @Bean method in a @Configuration class:

@Configuration
public class AppConfig {

    @Bean
    public Clock clock() {
        return Clock.systemDefaultZone();
    }
}

Auto-configuration

@SpringBootApplication combines three annotations: @SpringBootConfiguration (a configuration class), @ComponentScan (component scanning) and @EnableAutoConfiguration.

Auto-configuration inspects the classpath and the beans you already defined, then creates the beans you are likely to need. With Spring MVC and Tomcat on the classpath you get an embedded web server and a DispatcherServlet; with a JDBC driver and spring.datasource.url you get a DataSource. Every auto-configuration is guarded by conditions such as @ConditionalOnClass and @ConditionalOnMissingBean, so if you define a bean of the same type yourself, auto-configuration backs off. Your own beans always win.

Fragen zu diesem Kapitel?
Vorheriges KapitelProject Structure and ConfigurationNächstes KapitelData and State

To see which auto-configurations applied and why, run with --debug and read the condition evaluation report. To switch one off entirely, use exclude:

@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
public class DemoApplication { /* ... */ }

Starters

A starter is a curated set of dependencies for one capability. A single dependency brings in the libraries and their matching auto-configuration:

  • spring-boot-starter-webmvc: Spring MVC, embedded Tomcat, JSON via Jackson
  • spring-boot-starter-data-jpa: Spring Data JPA with Hibernate
  • spring-boot-starter-validation: Bean Validation
  • spring-boot-starter-security: Spring Security
  • spring-boot-starter-actuator: health checks, metrics and other production features

REST controllers

Methods in a @RestController return objects that are serialized to JSON. Bind path variables with @PathVariable and request bodies with @RequestBody. Java records make good request and response types.

@RestController
@RequestMapping("/api/todos")
public class TodoController {

    private final TodoService service;

    public TodoController(TodoService service) {
        this.service = service;
    }

    @GetMapping("/{id}")
    public TodoResponse get(@PathVariable Long id) {
        return service.find(id);
    }

    @PostMapping
    public ResponseEntity<TodoResponse> create(@RequestBody CreateTodo request) {
        TodoResponse created = service.create(request.title());
        return ResponseEntity.created(URI.create("/api/todos/" + created.id())).body(created);
    }

    public record CreateTodo(String title) {}
    public record TodoResponse(Long id, String title, boolean done) {}
}

Type-safe configuration with @ConfigurationProperties

You can inject single values with @Value("${...}"), but groups of related settings are safer as @ConfigurationProperties. Keys under the prefix bind to the record's components:

@ConfigurationProperties("app.mail")
public record MailProperties(String from, Duration timeout, boolean enabled) {}
app:
  mail:
    from: no-reply@example.com
    timeout: 5s
    enabled: true

Add @ConfigurationPropertiesScan to the entry-point class and these records become beans that other beans can receive through their constructors. Values like 5s are converted to Duration automatically.

A note for Kotlin

Kotlin classes are final by default, which prevents Spring from creating proxies. Kotlin projects from Initializr include the kotlin("plugin.spring") compiler plugin, which opens classes carrying Spring annotations. Constructor injection maps naturally onto Kotlin's primary constructor:

@Service
class GreetingService(private val clock: Clock) {
    fun greet(name: String) = "Hello, $name"
}

Summary

  • The container creates your objects as beans and wires them through constructor injection.
  • Auto-configuration creates beans based on the classpath and conditions; beans you define always take precedence.
  • One starter brings in the dependencies and auto-configuration for a capability.
  • Bind related settings to @ConfigurationProperties records for type safety.

0 Kommentare

Top-KommentareNeueste zuerst

Anmelden · Melde dich an, um einen Kommentar zu schreiben.