Initialize Your Spring Boot Projects From The CLI
Written by Nikos Vaggalis   
Tuesday, 04 June 2024

For the lovers of the command line, Spring Initializer Go is a tool with which you can initialize your Spring Boot projects without using the mouse. Is that essential?

Of course there's many aspects of a framework that will drive the decision of sticking to it and certainly a project initializer should not be one of them.

Or is it? As we will find out, it does make a big difference to the framework's usability and user friendliness.

Spring had one for ages, but it was solely GUI/browser based.
So navigating to https://start.spring.io/ you can customize the build system (Maven and Gradle), the language and version, the packaging and the dependencies of your project and download the starter template.

GUI wise, the initializer could be invoked from within popular IDEs like Intellij which provides the Spring Initializr project wizard that integrates with the Spring Initializr API to generate and import your project directly from the IDE.

While it might sound as not that big a deal, the initializer's importance is emphasized by Reza Rahman, a committer on the Eclipse Starter for Jakarta EE project, upon Jakarta EE getting one of its own:

The starter project demonstrates the applications that users built can run on selected Jakarta EE certified runtimes. In its absence, there isn’t anything to help developers get started using Jakarta EE. If they had the necessary knowledge and were very motivated, they could figure it out. But it created a lot of unnecessary friction.

So it makes it easy for beginners to start with.

tui

All well, but Jakarta's version is again, web-based. What about those that can't leave their command line? Fear not as Spring Initializer Go has entered the room. Its author explains the rationale behind its inception:

As a software developer, I frequently found myself writing extensive code, leading to discomfort and wrist pain. Seeking solutions, I explored ways to reduce mouse usage. Transitioning many aspects of my workflow to the terminal proved both comfortable and efficient.

However, during the initiation of a new Java project, I encountered a roadblock: the absence of a terminal-based user interface (TUI) version of Spring Initializr. Determined to bridge this gap, I embarked on creating a solution tailored to my needs.

So he went to build it basing upon the Bubble Tea powerful little TUI Go framework. And why Go? because of Bubble Tea, which is amazing, and because Go can create lightweight cross platform binaries.

As such the initializer is being offered as a pre-compiled binary, available from the releases section of its Github repo, as well as by installing it from the command line by cloning the repository and running:

make compile-current or go build . /cmd/spring-initializer/ in the root of the repository.

Prerequisite is having Go installed on your machine.

And with that you can from now on configure and bootstrap your Spring boot project from the comfort of the command line. 

springsq

More Information

Spring Initializer Go

Related Articles

Two New Resources Tailored To Spring Developers

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Yugabyte Improves Postgres Compatibility
24/09/2024

YugabyteDB has been upgraded with what the developers describe as enhanced Postgres capability in the form of new capabilities and architectural enhancements that allow a broader range of Postgres app [ ... ]



Cortex Click - Bringing AI To Technical Documentation
19/09/2024

New start-up, Cortex Click, has launched a self-service, LLM-powered content generation platform designed produce high quality content for developer audiences including blog posts, tutorials, landing  [ ... ]


More News

kotlin book

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Tuesday, 04 June 2024 )