Okta setup example for Legacy Spring Application (No Spring Boot)

Hello,
We are looking for documentation/tutorials about setting up Okta with Legacy Spring Application (No Spring Boot). Just like for Spring Boot we have in GitHub - okta/okta-spring-boot: Okta Spring Boot Starter Official Okta GitHub Repository which contains all the steps for Okta modules configuration, properties, Java Config.
We have tried various ways of finding that but It’s really hard to find especially for Legacy Spring App, almost all solutions found throughout the internet are for Spring Boot.

I also found this topic: Spring configuration without Spring boot but it’s doesn’t work as mentioned.

So still is there any sure way for that or do we need to migrate our legacy spring app to spring boot. (This is a huge task for a large project).
Please Suggest Alternatives and Solutions.

I had the same challenge when I did a POC, 2 years back. We were using Spring namespace XML (version 4.3) and not Sprint boot. All the examples, I found were were in Spring boot. Infact, I found that features like oauth2Login, etc that were available in Spring boot were not even there in Spring XML namespace Provide XML namespace support for OAuth2Login · Issue #4557 · spring-projects/spring-security · GitHub . It has been added in Spring security in recent versions of Spring security release Add XML namespace support for oauth2Login() by jgrandja · Pull Request #7743 · spring-projects/spring-security · GitHub
if upgrade is an option, I would probably start from there i.e. upgrade the Spring security version to the latest (warning - it might break something else, so it might still be a big effort).
Though I was able to configure it within my Spring 4.3 version of the application, It took couple of sleepless nights in order to achieve it. As it was just a POC, I don’t have it handy. But I’ll try to find it and share the notes or snippets with you.