Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to use in a Spring MVC project (without Spring Boot) #124

Open
mic4126 opened this issue Jun 5, 2024 · 7 comments
Open

Possibility to use in a Spring MVC project (without Spring Boot) #124

mic4126 opened this issue Jun 5, 2024 · 7 comments

Comments

@mic4126
Copy link

mic4126 commented Jun 5, 2024

Hi, My company project currently set up the Spring project without Spring boot.

After a quick look in the repo, I find out that Spring Boot seems to only used for easier registering configuration.

So, is it possible (maybe with some PR) to work in a Spring only setup?

Thank you.

@checketts
Copy link
Collaborator

It should work in theory. You could try pulling in the dependency and excluding the Spring Boot ones

@wimdeblauwe
Copy link
Owner

Can you elaborate why you do not want to use Spring Boot ?

@mic4126
Copy link
Author

mic4126 commented Jun 6, 2024

Because my team thinks spring boot update too ofter and company IT policy requires it team to keep update library and each update need to request user's UAT acceptance. Therefore, they remove spring boot (just use spring) from the project.

@wimdeblauwe
Copy link
Owner

I think the framework itself and Spring Boot have about the same amount of updates, so I don't think this is a valid concern. If you want to be up-to-date, you will have the same amount of work using Spring Boot or not. I even think you have more work without Spring Boot, since you now will have to keep track of all other dependencies (spring security, spring data, ..) that you use as well and ensure all versions are aligned. With Spring Boot, this is automatic.

@mic4126
Copy link
Author

mic4126 commented Jun 11, 2024

I am only a junior programmer in the team, I can't change my team's negative opinion on Spring boot (even I think you are right.)

Also, my team is still waiting the infrasecture team to rollout jboss 8 container image, our team current still stuck at Spring 5.3.x version due to this.

@ilonachan
Copy link

I'm in the same situation, though my team's reason is not that we hate Spring Boot (we use it in a bunch of apps) but that moving a legacy app to a whole new foundation simply isn't worth the effort. Obviously if getting this library to work in a non-Spring-Boot context is MORE effort then that's that, but I'd be surprised.

My big question is: the main reason Spring Boot is even presupposed is because of the autoconfiguration, correct? In that case, a regular Spring MVC project would necessarily have to do that same configuration manually; what would that consist of? What do I need to define where? I believe even just the documentation of that would be worth a PR.

@wimdeblauwe
Copy link
Owner

I believe if you create the things that are created in https://github.com/wimdeblauwe/htmx-spring-boot/blob/main/htmx-spring-boot/src/main/java/io/github/wimdeblauwe/htmx/spring/boot/mvc/HtmxMvcAutoConfiguration.java it should probably work. But I have not tested it.

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

No branches or pull requests

4 participants