Upgraded to Spring Boot 3 (yes i am late). Found out `@PreAuthorize is a decorative corpse`. You now need `@EnableMethodSecurity(prePostEnabled = true)` to reanimate it. Laughable.

Thankfully, I had tests. Which is ironic, because I wanted to test my code, not Spring’s trust issues.

This dev experience? Trash tier. Writing one annotation to enable another? That’s not configuration—that’s a scavenger hunt in a haunted house. 👻🔍

Annotations should do something when you use them. Not wait for permission like a guilty intern. Imagine you would have to add a Junit annotation to tell, that test failures are thrown.

Should’ve just gone full auth(request) at every endpoint. More stable. Less betrayal.

#SpringBoot3
#WhyTrustWhenYouCanTest
#AnnotationAnxiety
#CodeOrCursedRitual
#IDidntChooseTheBugLife
#PreAuthorizePostMortem
#FrameworkGaslighting
#coding
#programming

I hit a minor snag with Java 21 during a security review due to tool compatibility issues. Cutting-edge tech is great in the age of containers, but they don't solve all the problems! Transitioning to #SpringBoot3 also meant new security config. #Java21 https://debugagent.com/building-gdocweb-with-java-21-spring-boot-3x-and-beyond
Building gdocweb with Java 21, Spring Boot 3.x and Beyond

Starting a new project is always a mix of excitement and tough decisions, especially when you're stitching together familiar tools like Google Docs with powerhouses like GitHub Pages. This is the story of building gdocweb, a tool that I hoped would m...

Java, Debugging, DevOps & Open Source

This week I've had some hands on practice with #SpringBoot3. I'm still not excited with building things using #frameworks but I'm making an effort to learn.

I did find one thing that I actually think is pretty nice. When you launch an application made in Spring Boot the console output generates a banner which is ok, but then I found out you can change that banner. All you need is an #ASCII_Art file and to tell the application the name of the file, and that's all there is to it.

Today I learned that in #springboot3 (Spring Security6) it is not sufficient anymore to use SecurityContextHolder.getContext().setAuthentication(…) but that I have to use securityContextRepository.saveContext(securityContext, httpServletRequest, httpServletResponse); additionally to save the context. Now I have three instead of one line just to set the authentication to the context. 🤷‍♂️
It is one of these days... I fixed half of the day some #springboot3 upgrade issues and could not fix a failing test until I realised that the URL of the called controller ends with a trailing slash (/testurl/). This never caused any problems and now suddenly broke the test with Spring Boot 3. Now I need the easter break.

Privates Kotlin Rumspielprojekt erfolgreich auf Spring Boot 3.2 und Java 21 gebracht.

Lösung für die meisten Probleme war:
1. Gradle selbst mit Java 20 laufen zu lassen
2. Die Java Toolchain im gradlescript per

java {
toolchain {
languageVersion = JavaLanguageVersion.of(21)
}
}

auf 21 zu setzen. Aktuell scheint das noch nicht im Spring Initialzr so drin zu sein.

#Java #Kotlin #Spring #SpringBoot #SpringBoot3

The final count of our #SpringBoot3 upgrade…

Let's update our dumb API gateway from #SpringBoot 2 to #SpringBoot3. Should be a walk in the park!

… one week later: 😱

Some package for #SpringBoot3 not getting pulled properly and screwing up my integration tests just made my day! 😅

#java #SpringBootMigration #JDK17 #SoftwareDevelopment

Started the #SpringBoot3 #Java17 migration for a JAR library today. It's a REST API client using #springwebflux for a vendor proxy service. Almost done.

A few more applications to go. Well, it's a team effort, so I have one more assigned to me. Might work on that #OpenShift #ConfigMap update. We'll see.

#java #jdk17 #springframework #softwaredevelopment