sjohnr / springone-2021

Spring Security 5.5 From Taxi To Takeoff

Home Page:https://springone.io/2021/sessions/spring-security-5-5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Currently the main branch `:filghts-api:bootRun` task fails "out-of-the-box" on Windows

nebbish opened this issue · comments

Hello, and first I want to say thanks for a solid presentation package with a Youtube video together with this Github repo.

When I attempted to follow along, I grabbed the repo, and ran through the "Getting Started" section.
I am on Windows BTW and the error was:

> Task :flights-api:generateAot FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':flights-api:generateAot'.
> No access hint found for import selector: org.springframework.boot.autoconfigure.data.jpa.JpaRepositoriesAutoConfiguration$JpaRepositoriesImportSelector

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 25s
3 actionable tasks: 3 executed
Press any key to continue . . .

When I then looked at the Git repo history, I discovered that the "main" branch was already done with all the steps.
So I checked out "demo" to find a state prior to the work I'm about to "follow along" -- and that built fine! 😃

So right after finishing this issue report, I'll go right back and go through the demo, following along.
I am way too new at this to have any clue what was going wrong above.

When I encounter the build issue again while going through the demo, I should have more details to add that may be helpful.
In the meantime, here's the versions I'm working with:

Microsoft Windows [Version 10.0.20348.825]
(c) Microsoft Corporation. All rights reserved.

C:\devplay\spring-security-5_5-from-taxi-to-takeoff\springone-2021>node --version
v19.0.0

C:\devplay\spring-security-5_5-from-taxi-to-takeoff\springone-2021>npm --version
8.19.2

C:\devplay\spring-security-5_5-from-taxi-to-takeoff\springone-2021>gradle --version

------------------------------------------------------------
Gradle 7.5.1
------------------------------------------------------------

Build time:   2022-08-05 21:17:56 UTC
Revision:     d1daa0cbf1a0103000b71484e1dbfe096e095918

Kotlin:       1.6.21
Groovy:       3.0.10
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.11 (AdoptOpenJDK 11.0.11+9)
OS:           Windows Server 2019 10.0 amd64


C:\devplay\spring-security-5_5-from-taxi-to-takeoff\springone-2021>

Half way through -- I got stuck unable to produce the same error you saw in the presentation.
I am giving up on your demo for now.

There were other problems: the code shown was already "enhanced" in ways that were not described from the base Demo version. For example, @24:37 Marcus's screen shows an update to the SecurityConfiguration class that was not described or explained: the call to .cors(Customizer.withDefaults())

Following along the described edits, leaving the above out, -- or putting it in -- either way, I still could not reproduce the same "demo error". Tried with Edge & Chrome.

Thanks for your feedback @nebbish. Since the presentation was recorded "live" there can sometimes be little differences between what shows up in the steps of our branch and what ends up on screen, which show up as inconsistencies. Of course, we try very hard to make it as accurate as we can.

As far as build issues go, this presentation was done before the latest round of major releases. At that time, Spring Native was an experimental project which has since been replaced by official support in Spring Framework 6. Working through any build issues you encounter related to native support on this branch/repo would probably not be productive going forward. So I wouldn't recommend spending time on it if you get stuck (probably best to just enjoy the content of the presentation as it is, and not worry too much about following along).

Since this type of content gets stale quite quickly, I'd encourage you (if you're able/interested) to try out Spring 6 / Spring Security 6 / Spring Boot 3 at start.spring.io. We'll be presenting at Devnexus on Next up: Spring Security 6 in April (2023) and will be upgrading the applications used in this presentation to the latest major version!