Spring-Boot / Groovy / Gradle “Hello World” application

The complete code for this project can be found here:

Last weekend I was playing around with Gradle which I have never used before. The result is this very basic spring-boot project just to illustrate how I did it. Gradle isn’t that difficult but I had a few problems until I learn about the spring-boot-gradle-plugin and such.

This is the build.gradle:

As you can see it’s fairly simple and way more organized than Maven in my opinion. The spring-boot-gradle-plugin is the key here. It provides all the version information for the dependencies and also adds a Gradle task “bootRun” which you can use to run your project.

Now we just need a main class:

Not that different from Java, right?

I’m a complete newbie on Gradle and Groovy but I really liked what I saw so far… If I made some mistake please leave a comment.

See ya!

You may also like...

3 Responses

  1. Thanks for the share. My pappy used to say “The key to immortality is first living a life worth remembering” ūüôā

  2. I’m grateful you decided to be blogging about this. I’m feeling enlightened!

  3. We stumbled over here coming from a different page and thought I might check things out. I like what I see so i am just following you. Look forward to looking at your web page for a second time.

Leave a Reply

%d bloggers like this: