In this code "package com.luv2code.crud_demo;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
public class CrudDemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(CrudDemoApplication.class, args);
    }

    @Bean
    public CommandLineRunner commandLineRunner(String[] args) {
        return runner -> {
            System.out.println("Hello world");
        };
    }
}" what's the deal with that CommandLineRunner? I'm following a tutorial and that's the transcript of the video "Instructor: Okay, so we have

the command line runner in place.

We need to do one more thing before we move forward

and that's setting up our application dot properties file.

In our application properties,

we need to add our JDBC database connection information.

We need to add an entry here for our data source URL.

So we give the property name of Spring data source dot URL

and then we give that actual URL.

And this will connect to our student tracker.

And that's that database schema

that we set up in previous videos.

We'll need to set up another property here

for the Spring data source dot username

and recall we have a user called Spring student.

I'll do a quick copy, paste here

and I'll simply update the property name

for Spring data source dot password.

And again, remember our password's the same

as our username, purely for academic purposes.

So now at this point we can go ahead

and run this application and test it out.

And good stuff here.

We can go look at some of the logs here.

And let me scroll over here to the right hand side.

So it says that it's starting our application.

So it says it added a connection.

So that means that the database connection was successful.

So if you see this part, that means it's able

to successfully connect to your database.

If not, it would've given you an error,

but for now at least we see that that part is okay.

And then also if we scroll over a bit

then we see hello world.

Excellent, so that's our custom code that we set up

for our command on application.

So we know that our code is being executed accordingly,

which is really good.

And then once it's done, then the application stops.

It's just a simple command on application that'll run

and perform an operation.

And now let's break it on purpose.

(laughing)

Let's check to see if it really is connecting

to the database.

So I'll just go ahead and add a bad password here.

Be sure to save that file.

And now if you run it again,

then we should see some ugly exceptions

and oh, great, excellent, good, good, good.

Some ugly exceptions here.

So this is good 'cause we wanted to break it on purpose.

So this is kind of what we're looking for.

And let's scroll up for a bit

and look at all of these exceptions here that were thrown.

And then scroll over a bit.

And we can see right

at the point where it's setting up the actual pool.

It's starting the pool

but exception during pool initialization

meaning the database connection pool.

And it says that access denied for this given user.

So it fails because we're using the wrong password.

So behind the scenes Spring really is trying to connect

to your database using that information

from your application dot properties file.

All right, so that's good.

We broke it on purpose and that was desired.

Now let's go ahead and fix it, right?

Let's go ahead and swing it back to the correct password

of Spring student.

Be sure we save this file

and then swing over and then run it again.

And in this case we see everything's okay.

So it's creating a pool

and added connection started completed successfully.

So that's all good.

So we're, we're good to go.

So it can run, connect to the database

and all that good stuff, so good job.

One thing I'd like to do is that when we're running

these standalone applications,

I really wanna kind of just focus

on doing some operation and then printing out the results.

I wanna turn off some of the chatter

and one piece of chatter I wanna turn off

is this Spring Boot banner.

When I'm running a standalone application,

I really don't wanna see the Spring Boot banner

every time I know that I'm running Spring Boot.

There's no need for you to remind me

every time I run the application.

So I'd like to turn off this banner

and you can easily do this via a configuration.

So let's swing over to our application dot properties

and then we'll add an entry here

to turn off the Spring Boot banner.

I'll simply add this entry here.

Spring dot main dot banner mode equals off,

and that'll actually turn off the Spring Boot banner,

so be sure to save that file.

And then when you run the application again,

you'll see that it runs without the Spring Boot banner

being displayed every time.

Again, we're just trying to minimize some of the logging

and minimize some of the chatter

that we see when we run our application.

And then also, I wanna reduce the logging level.

So I wanna set the logging level to warn such

that it'll only show the warnings and the errors

but not all the normal

background logging information for Spring.

And again, I'm simply doing this just

because we're creating a standalone application

and normal production environments

You may want to keep this on

depending on your application requirements,

but for now we're simply gonna change

this logging dot level dot route equals worn.

So we'll see warning messages and we'll see error messages

but I basically wanna say,

hey, don't print all that logging stuff.

I'll simply wanna see the information

or the output from my application.

And here we see this hello world.

And notice here we get the hello world,

that's our own custom code.

We don't have all the Spring Boot banner stuff

and we don't have all the Spring Boot logger information.

But one thing here is that don't worry,

if there are problems or issues it'll still log the warnings

and it'll also log the errors.

So if there's an exception or something,

Spring will still tell you about it.

And then let's try and verify that.

Let's go back in here and let's try

and break it again on purpose.

Let's give a bad data source password.

Be sure to save that file.

And now we run our application again.

Then we still see the error, right?

We still see this given error message.

Scrolling to the top, it says, you know,

access denied for Spring students.

So again, you'll still see the warnings

and you'll still see the errors

by making use of that logging level that we have set.

And let's just go back and fix it.

And run it one last time and everything's okay.

So we have our hello world.

So that's our own custom code.

We're all set up now.

We can start adding more custom code.

And so we'll add some code here for DAOs,

connecting to a database, doing hibernate JPA stuff.

But at least we have our framework in place.

So I'd like to say good job, my friend.". Also what's a lambda? I'm coming from angular ts so maybe there's something equivalent