spring-guides / gs-authenticating-ldap

Authenticating a User with LDAP :: Learn how to secure an application with LDAP.
https://spring.io/guides/gs/authenticating-ldap/
Apache License 2.0
97 stars 154 forks source link

Initializr does not create all code needed for documented walkthrough #50

Open FerretDave opened 8 months ago

FerretDave commented 8 months ago

The steps at https://spring.io/guides/gs/authenticating-ldap/ to use a pre-generated project or to manually initialise the project do not create source suitable for the rest of the guide There is no HomeController.java class file ? Also, the pre-generated initialise link warns that: 'Spring Boot 3.1.0 is not available, 3.1.7 has been selected.'

robertmcnees commented 3 months ago

Hi @FerretDave. Exclusion of the HomeController.java class in the initial folder is by design. Spring Initializr adds the dependencies but leaves all application code up to the user. The initial folder in this repository is intended to be a direct replication of what you would get from Spring Initializr. If you are following along with the tutorial, the heading Create a Simple Web Controller is to indicate this is a file the user will need to create. Granted that having the instruction in the heading is not as clear as having it in the text, in my opinion. I think the guide could use clarification under this heading as a documentation change.

Regarding the pre-generated link, you're correct the link has an outdated version. Specifically this request parameter &platformVersion=3.1.0 is the problem on this line. Additionally, the Java 17 request parameter can also be removed. &jvmVersion=17. These values are set by default when you visit the page to the latest versions, so we can leave them out of the URL entirely. We're slowly making this change across the guides.

Would you like to submit a PR for either of those documentation changes?

  1. Add more clear instructions that the user is required to create the HomeController class
  2. Remove &platformVersion=3.1.0 and &jvmVersion=17 from the Spring Initializr link.