Languages
[Edit]
PL

Spring Boot 2 - używanie index.html

4 points
Created by:
Creg
9600

Celem tego artykułu jest pokazanie, gdzie należy umieścić plik index.html w aplikacji Spring Boot 2.

Wskazówka: w tym artykule dowiesz się, jak stworzyć od podstaw aplikację Spring Boot 2.

 

Efekt końcowy:

Przykład użycia index.html w Spring Boot 2.
Przykład użycia index.html w Spring Boot 2.

Wykonaj kroki:

  1. dodaj plik index.html wewnątrz katalogu src/main/resources/static/:
    np.
    // ONLINE-RUNNER:browser;
    
    <!doctype html>
    <html>
    <head>
      <meta charset="utf-8" />
      <title>Tytuł strony internetowej</title>
    </head>
    <body>
      <p>Tekst strony internetowej ...</p>
    </body>
    </html>

     

  2. uruchom aplikacje Spring Boot 2 (lub zrestartuj obecnie uruchomioną),

     

  3. wpisz w przeglądarce internetowej adres http://localhost:8080.

 

Przykładowa struktura projektu:

 

Alternative titles

  1. Spring Boot 2 - wstawianie index.html
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join