Skip to content

0LIVICH/Spring-Web-MVC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Blog App

Spring Web MVC приложение с Embed Tomcat для управления блогом.

Описание

Это приложение предоставляет REST API для управления постами блога с полной CRUD функциональностью.

Технологии

  • Java 17
  • Spring Boot 3.2.0
  • Spring Web MVC
  • Embed Tomcat
  • Maven

Запуск

mvn spring-boot:run

Приложение будет доступно по адресу: http://localhost:8080

API Endpoints

  • GET /api/posts - получить все посты
  • GET /api/posts/{id} - получить пост по ID
  • POST /api/posts - создать новый пост
  • DELETE /api/posts/{id} - удалить пост по ID

Примеры запросов

Создание поста

curl -X POST http://localhost:8080/api/posts \
  -H "Content-Type: application/json" \
  -d '{"title": "Новый пост", "content": "Содержимое поста"}'

Получение всех постов

curl http://localhost:8080/api/posts

Получение поста по ID

curl http://localhost:8080/api/posts/1

Удаление поста

curl -X DELETE http://localhost:8080/api/posts/1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages