sofastack / sofa-boot

SOFABoot is a framework that enhances Spring Boot and fully compatible with it, provides readiness check, class isolation, etc.
https://www.sofastack.tech/sofa-boot/docs/Home
Apache License 2.0
4.95k stars 1.26k forks source link

Can not create SOFABoot Core application #86

Closed QilongZhang closed 6 years ago

QilongZhang commented 6 years ago

Because Infra module has a strong dependency of spring-boot-starter-web , it leads to a SOFABoot Core application which just provides sofa service can not be created. @guanchao-yang

guanchao-yang commented 6 years ago

In 2.5.0 We can make our HealthCheck and Infra all optional and only take effect in WEB environment

khotyn commented 6 years ago

@guanchao-yang HealthCheck and Infra are not need in a pure service environment?

guanchao-yang commented 6 years ago

@khotyn

HealthCheck and Infra are not need in a pure service environment?

No. Wanted to change our default strategy.

Our strategy now is take effect in every project such as a pure service environment or web environment.It will cause WEB Container must start.I think we can make our HealthCheck and Infra feature optional and only take effect @ConditionalOnWebApplication 。Otherwise user use our HealthCheck and Infra will start WEB Container by default ,and whether WEB Container is user wanted.

khotyn commented 6 years ago

@guanchao-yang What's problem if we start a web container to support HealthCheck and Infra? I suggest we enable health check and infra by default, but make other component's dependency on health check and infra optional.

guanchao-yang commented 6 years ago

Issue from @QilongZhang . Explain why you must don't have web container in SOFAArk .We can discuss。

QilongZhang commented 6 years ago

@khotyn @guanchao-yang

What's problem if we start a web container to support HealthCheck and Infra?

Multi springboot/sofaboot web can't run in ark, please reference https://github.com/spring-projects/spring-boot/issues/10617

As runtime component depends on infra, however, infra depends on spring-boot-web, so a pure service application cant be created with sofaboot.

khotyn commented 6 years ago

I see, when you mean pure service application, you mean it can not contains any web container. However I think we should not such a constraints.

The problem you meet is when you have multi application deployed to ark, there is some problem happens related to the web container.

But even if you make a SOFA core application does not depend on the web container, there is still possible that you can will deploy two SOFA web application to SOFAArk.

QilongZhang commented 6 years ago

ok. @khotyn @guanchao-yang i will make infra dependency of runtime to be optional, maybe its a narrow opinion about pure service application