micronaut-projects / micronaut-starter

Generates Micronaut applications
Apache License 2.0
213 stars 95 forks source link

Missed plugins for spring-boot starter project #376

Open ilkin opened 4 years ago

ilkin commented 4 years ago

Hi, generate simple spring-boot project from launch, missed below plugins, so throws Task 'bootRun' not found in root project...:

id "org.springframework.boot" version "2.2.3.RELEASE"
id "io.spring.dependency-management" version "1.0.6.RELEASE"

Thanks

sdelamo commented 4 years ago

@ilkin

Could you clarify the steps to reproduce the issue?

These are the steps I followed:

The app starts fine for me.

tomsiwik commented 4 years ago

Same here. Did steps mentioned above. Added feature flag and tried to run with Elide. It starts but doesn't get controllers, config and basically no endpoint works. Uncommenting back to string boot works again and all endpoints are reachable. Currently it's 1am here... when I wake up I'll push my current implementation and link it here. However bootRun works... but as said: no endpoints are created.

tomsiwik commented 4 years ago

Here is a reproducible project: https://github.com/tomsiwik/non-working-micronaut You can fire-up docker-compose for a postgresql instance and uncomment StringApplication in Application.java to get you up and running with a spring boot app. Under localhost:8081/doc there should be openapi json output. When using Micronaut this endpoint and others are not available. While everything starts with bootRun, Micronaut does not autoconfigure.

The last issue/ticket explains the problem better: https://github.com/micronaut-projects/micronaut-spring/issues/106

ilkin commented 4 years ago

./gradlew run doesn't start spring-boot correctly, ./gradlew bootRun starts spring-boot correctly and requires plugins, that shown example https://github.com/micronaut-projects/micronaut-spring/tree/master/examples/greeting-service

@sdelamo

The app fails for me and throws Task 'bootRun' not found in root project...