Skip to content

Conversation

@vaslabs
Copy link
Contributor

@vaslabs vaslabs commented Oct 22, 2025

Motivation

Related to #6006

Getting a "learning path" on how to setup spring boot projects in increasing complexity. The aim of the documentation is to follow the spring boot learning path and map it to mill.

In this PR

This is the first small step of getting a kotlin project as downloaded from spring boot's initializr project to work with mill . While spring boot examples exist in mill, this differentiates by

  • Project structure is the same as initializr
  • Dependencies are up to date (and thus resulting in Junit5 failing without the platform version override) - I can also do these updates in the existing examples if you'd like
  • Added an extra mill command to demonstrate how to build a jar and run the spring boot server
  • Documentation scaffolding (see below)

Documentation Scaffolding

This PR adds a special section for spring boot in both Java and Kotlin. The aim is to add more examples in increasing complexity as they appear here

image

The examples an in a separate example/springboot so it will be easier to the reader and to the tester (e.g. for directory grouping without affecting other javalib/kotlinlib examples, port isolation)

Manual Tests

Running the assembly jar

image image

Follow up PRs (plan)

  • More examples
  • More docs

@vaslabs vaslabs marked this pull request as ready for review October 23, 2025 06:56
@lihaoyi
Copy link
Member

lihaoyi commented Oct 23, 2025

Looks reasonable I think, some notes:

  • Can we have a Java version of this example in addition to Kotlin? In general we should prioritize Java for the spring-boot stuff, since the vast majority of spring-boot users are on Java

  • This should be wired up into the website on website/docs/modules/ROOT/pages/kotlinlib/web-examples.adoc

  • Since we're focusing on the Java spring-boot examples, I expect the to be numerous enough to deserve their own documentation page, which we can put at website/docs/modules/ROOT/pages/javalib/spring-boot.adoc

@vaslabs
Copy link
Contributor Author

vaslabs commented Oct 23, 2025

Looks reasonable I think, some notes:

  • Can we have a Java version of this example in addition to Kotlin? In general we should prioritize Java for the spring-boot stuff, since the vast majority of spring-boot users are on Java
  • This should be wired up into the website on website/docs/modules/ROOT/pages/kotlinlib/web-examples.adoc
  • Since we're focusing on the Java spring-boot examples, I expect the to be numerous enough to deserve their own documentation page, which we can put at website/docs/modules/ROOT/pages/javalib/spring-boot.adoc

agreed, will add the java and start its own documentation page, I was planning to do so anyway in subsequent PRs, just wanted to get some early feedback

@vaslabs vaslabs marked this pull request as draft October 24, 2025 08:10
@vaslabs vaslabs marked this pull request as ready for review October 27, 2025 10:41
@vaslabs
Copy link
Contributor Author

vaslabs commented Oct 27, 2025

created separated directories for both docs and code examples, added the doc sections and added some references in the docs.

the plan is to add to these examples and docs following the spring boot project structure in increasing difficulty (e.g. https://github.com/spring-projects/spring-authorization-server/tree/main/samples) (probably as we go we can exclude trivial examples, but that we can discuss later on case by case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants