Is it correct that Spring is also used for front-end?

I am simply looking for some confirmation. I had assumed Spring was only for back-end, yet some features seem to be made for front-end, which confuses me.

Example: Oauth2Login

Is this true? Simply asking this to clear up some confusion.

Answer

Depends on what you mean by “for frontend”. Spring is a java framework: anything written in java can use it. For example, if you have a desktop application it can be written in all java, and it can use Spring too.

With web applications, you generally need HTML, javascript, CSS and not just java code. Spring can produce HTML with its own mvc or a template engine such as Thymeleaf and serve or generate javascript or CSS. For example spring-security can generate login forms and handle them, too. In that sense Spring also has an impact on frontend. However, it is not a “frontend framework” as such, it is a java framework and can be leveraged wherever java is used.

Leave a Reply

Your email address will not be published. Required fields are marked *