V
V
Vanes Ri_Lax2021-06-15 13:20:09
Java
Vanes Ri_Lax, 2021-06-15 13:20:09

Is it possible to use spring like this?

Good afternoon! I'm just starting to learn spring, there was such a question. For example, I have an application that accesses the database, does it make sense to connect springframework only to work with the database?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
Y
Yerlan Ibraev, 2021-06-15
@mad_nazgul

Yes. And it makes sense to take SpringBoot, because. there is so much "syntactic sugar" that it will not be necessary to write a bunch of bolt-plate code. :-)

O
Orkhan, 2021-06-15
Hasanly @azerphoenix

Good afternoon

does it make sense to connect springframework only to work with the database

It may be worth connecting ORM frameworks to work with the database. For example, Hibernate, EclipseLink, MyBatis, ormlite.
In fact, spring is a bean container (an implementation of IOC & DI). Accordingly, if you want to use DI in your application, you can use spring. Well, or another lib for DI (guice, dagger, etc.)
For example, if you are writing a JavaFX application, then there is a good lib for quick integration of spring
https://github.com/rgielen/javafx-weaver/
And just to work with the database, use hibernate + hikaricp bundle

D
Dmitry Roo, 2021-06-15
@xez

Can.
But it's like buying a car to listen to the radio.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question