Building Command Line Applications in Spring with Spring Shell

preview_player
Показать описание
When you want to build a command line application what language, framework, or tools are you reaching for? What if you could use the language, framework, and tools that you use every day. In this introduction to Spring Shell, I will show you how to build CLI applications in a familiar programming environment using Java + Spring. You will also learn how to turn this application into a native app that can be run instantly from the command line.

00:00 Introduction
00:23 Spring Shell
01:12 Creating Application
02:13 Creating Commands
04:18 Shell Method Annotation
07:30 Shell Option Annotation
09:19 Dad Joke Client
13:58 Setting up Client
16:22 Creating Native Application
20:32 Running the Application
21:43 Alias for Dad Joke
22:30 Building CLI App

🔗Resources & Links mentioned in this video:

👋🏻Connect with me:

Рекомендации по теме
Комментарии
Автор

Came for Spring Shell. Learned about setting up Client ! Awesome.

remivieux
Автор

Very interesting to see this one after the live segments for it. A nice showcase of spring not just being for webapplications.

VerhoevenSimon
Автор

Great video. I have just started creating a Spring Shell application!

peterdavie
Автор

Exactly what I was looking for....You've been a great help.

aravshrivastava
Автор

It would be interesting to refactor your previous implementation of ChatGPT-Java CLI with Spring Shell.

memillin
Автор

amazing. loved it be making much more helpfull videos.

satyarajawasthismart
Автор

Thanks for this amazing explanation on Spring Shell. How would you write tests for it?

adityamparikh
Автор

Thanks man. Your Turtorials are really GREAT. I saw your video on GraalVM Native Images and got motivated to start with Spring Shell, so I had the idea of building a simple CLI that executes system shell commands such as "apt-get update" and "apt-get upgrade" since i'm on a linux distro. However, I didn't find any helpful sections about this in Spring Shell docs (or i'm blind!) nor on the web. Could you please point me somewhere where I can find some help. Thanks again!

dragon_id_
Автор

Great video.

Why did you have to add reactive dependency?

pmorah
Автор

Great video ! Is there a way to launch a command in non-interactive mode ?

guillaumehusta
Автор

Hi, how can implement this with Java 21? When I try to convert it to a native application I am seeing an error. I understand that maven compiler doesn't support Java21. "Failed to execute goal (default-compile) on project demo: Fatal error compiling: error: release version 21 not supported" Thanks!

nicobonder
Автор

Hello guys, do you know why default quit/exit commands doesn't work? I'm closing the app with custom method and use of System.exit(0), but would like to understand what is happening with the standard ExitRequest there.

JanCharamza
Автор

why does your intelli j look so different? what theme are you using? it's pretty cool

rbux
Автор

Can we disable the prompt shell `shell:>` ?
So you can just pass the commands and arguments in single line like $ cli command sub-command arguments ?

dev.aaajit
Автор

@DanVega, getting error this error, org.jline : Unable to create a system terminal, creating a dumb terminal (enable debug logging for more information) while running it on Mac OS in eclipse.
can anyone please help me on this?

ChaitaliJoshi-edek
Автор

Hi Dan, why do we need an interface?

RossieHoorn
Автор

When I run app, shell doesn't appear. Why it happens?

nijatSh