Streamlining Tasks in Java and Spring Boot with Compound Commands

In Java and Spring Boot, there’s no need to craft shell commands for some tasks. This capability proves incredibly handy. For instance, within your `build.gradle` file, you can define compound tasks. Here’s how you can set it up:

groovy
task buildAndRun {
dependsOn ‘clean’, ‘build’, ‘bootRun’
}

Then, to execute the task, simply run:

zsh
./gradlew buildAndRun

This approach streamlines your workflow, making development in Java and Spring Boot even more efficient.

Feel free to reach out to me on LinkedIn, which you can find below. Looking forward to connecting!

https://www.linkedin.com/in/tomoharu-tsutsumi-56051a126/

--

--

Tomoharu Tsutsumi
Tomoharu Tsutsumi

Written by Tomoharu Tsutsumi

5+ years Full Stack SWE (Ruby, Go, TypeScript, JavaScript) | Former Founding Engineer of AI Startup in Canada

No responses yet