Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Пример создания Spring Boot стартер для Spring Boot 3

  1. Собрать проект
./mvnw clean install

Windows:

mvnw.cmd clean install
  1. Запустить проект
./mvnw spring-boot:run -pl demo-application

Windows:

mvnw.cmd spring-boot:run -pl demo-application

⚠️ Как вариант, отключить автоконфигурацию и попробовать запустить. В этом случае ожидаемо получим ошибку, так как бин не будет найден.

./mvnw clean install \
  spring-boot:run -pl demo-application \
  -Dspring-boot.run.arguments="--example.starter.enabled=false"

Ошибка:

Consider defining a bean of type 
'com.example.starter.autoconfigure.ExampleService'
in your configuration.

⚠️ Если возникает ошибка, убедитесь, что пересобран модуль example-starter-autoconfigure.

Это можно сделать командой:

./mvnw clean install -pl example-starter-autoconfigure

или пересобрать полностью проект

./mvnw clean install

About

Spring Boot 3 Starter Simple Example

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages