I want to get myself more familiar with Spring Data & Spring Boot. I have looked at examples and couldn't find one that is not used by running it on a server like tomcat etc.
Is it possible to develop a simple client application that just talks to the db and runs on an OS by using spring data or spring boot?
I undertand, from you're post, The following question:
How to run spring boot without a web container?
Simply start your spring boot app in a non-web environment:
new SpringApplicationBuilder()
.sources(SpringBootApp.class)
.web(false)
.run(args);
Also, you obviously should not add the spring-boot-starter-web
dependency.
By default, spring boot launches a web container if it finds one in the classpath. Using web(false)
ensures that it does not happen. Tomcat could be included by another dependency without your knowledge, so it's better to disable the web environment if that is your goal.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With