Quarkus: Codestarts: Spring code examples aren't generated

Created on 6 Oct 2020  路  11Comments  路  Source: quarkusio/quarkus

When creating a project, if I select, e.g.,spring-web as the only extension then I get a command mode example project with the spring-web extension added in the pom.xml.
If I select the resteasy and spring-web extensions then I get a project with the JAX-RS code example but no Spring Web.
That's when the codestarts are enabled. If the codestarts are disabled then selecting Spring Web will generate the Spring Web example code.

arecodestarts arespring good first issue kinbug

All 11 comments

/cc @geoand
/cc @quarkusio/devtools, @ia3andy

Thanks for reporting @aloubyansky!

@ia3andy what do we need to do here to make codestarts use Spring Web instead of JAX-RS when the relevant extension is selected?

@geoand we just need to create an example codestart for spring, should be quick..

:+1:

@aureamunoz is this something you would be interested in looking into?

This is really urgent!

In order to create this codestart:

  1. duplicate the resteasy-example and name it spring-web-example https://github.com/quarkusio/quarkus/tree/master/devtools/platform-descriptor-json/src/main/resources/codestarts/quarkus/core/examples/resteasy-example, keep it in core/examples as it is a core example.
  2. Adapt the codestart.yml (relevant dependencies and data, use ref: spring-web)
  3. replace the different languages resources using the spring controllers (you need to convert it with the qute syntax, take resteasy as example) and keep the directories and files naming syntax {package-name.dir}/{resource.class-name}.tpl.qute.java:
  4. Keep the same tests
  5. bind it to the relevant extensions (spring-web I guess?) by adding a codestart: spring-web metadata field in: https://github.com/quarkusio/quarkus/blob/master/extensions/spring-web/runtime/src/main/resources/META-INF/quarkus-extension.yaml#L10
  6. Edit the README.md file with the good title and the link to the guide.

OK, will do it

Great, thanks!

@aureamunoz thanks! ping me on zulip if needed :)

Was this page helpful?
0 / 5 - 0 ratings