Basically this transcript "Instructor: In this video we'll cover the Spring Boot Starter…
- User
Basically this transcript "Instructor: In this video we'll cover
the Spring Boot Starter Parent.
Spring Boot provides a Starter Parent,
so this is a special starter that provides Maven defaults.
So in your pom.xml file,
you'll have an entry here for parent
and you'll give the actual groupId,
artifactId, and version.
And this is included in the pom.xml automatically
when using the Spring initializer.
So the Maven defaults are actually defined
in the Starter Parent,
so you get your actual default compiler levels.
It also has support for the UTF-8 source encoding,
and there are some other features out there,
but you get all of these features by default
by using the Spring Boot Starter Parent.
Now, you may wonder, "Well
I don't wanna use Java 8 as far as my Java version.
On our project we're using Java 12,
or Java 15, or Java 20, or Java 30."
I'm being ridiculous here
but Java's changing every six months now,
so that's a very valid concern.
So here you simply override a default
or override this and simply set the property here.
So here I say properties, java.version,
and you simply specify or just drop in
the version of Java that your project is using.
So this is pretty slick, I like it.
Now for the Spring Boot starter dependencies,
there's no need to list the actual version,
so basically here you give your actual parent,
so we have the Spring Boot Starter Parent
and we specify the given version that we're using.
Then, for the actual dependencies,
you simply inherit the version from the Starter Parent,
so there's no need to list the individual versions.
This is great for maintenance
and also it helps to make sure that all of the dependencies
here that you're using are compatible,
and that's regarding all
of the Spring Boot starter dependencies,
making sure those are all compatible.
Now also, the Starter Parent provides default configuration
of the Spring Boot plugin.
So in your build section for your pom.xml file,
you simply reference the Spring Boot Maven plugin,
and it's there ready to go.
There's no additional configurations
that you need to perform
to configure the Spring Boot plugin,
- Assistant