So now let's actually go ahead and check out the other application, which is a job, I also have a
repository for that so you can clone it from there.
Again, let's copy the good command and.
I'm going to it right here.
Now, let's open it in intelligence as well.
Sure, no window.
So this is a gradle project, so it's going to install the dependencies and all the necessary stuff
when I open the project.
This is also a very simple set up of Java application.
We have one Java file.
Which is important, Java, and this is all that the application does.
So basically we initialize a springboard application right here and the only thing we have is a logger
that basically just logs some stuff on Infl level.
And we also throw an exception so that we have an exception log in our logging system.
Same as, you know, just we just log a couple of lines and that's it.
Important thing here as well is that we are logging in JSON format.
So this logger here is configured to log in, Jason, and let's go and see where this is configured.
So first of all, this is our field gradle file, which is equivalent of ponded XML in even we have
the dependencies list here and the repositories where to pull those dependencies from and the plug ins.
So we have the springboard dependency and the second dependency is the log stash log back encoder.
That's the one that actually is configured to log in, Jason.
And that configuration file is right here in resources.
I have created this lookback or XML file, which basically configures this logging encoder for Jason
and then some other stuff configured like which level and so on.
So this will produce the logs and here you have the field names that this log entry will contain.
So we have the timestamp and just like we did in Node EBP, where we configured the timestamp format
and set the time field name here, we're actually going to use the same name here.
Let's actually change this t is two times so they both have the same field name for the same data.
So source.
This will be easier to pass later as well, and we also have a properties file where we get the values
for this configuration from and this is right here.
This is a spring application properties file where I just have to find some key value pairs.
We have the application name banner mode of basically means that we don't want to see the spring application
banner because that's not Jason Friendly or that's not Jason formate.
So we're just going to turn that off to clean our logs.
We have the info level for everything other than spring framework looks, so that should work fun and
that's it.
That's the whole Java Springboards basic application configuration.
And again, we want to build this into a Docker image.
That's why we have Docker file here.
We also have a base image for Java, which is open JDK eight.
This is the base image on which our Java application image will, based on Expo's, basically means
that our application will start at Port Hédi inside the container.
And here we also copy the application files or the application zha into a folder inside container so
that we can run.
It encourages application.
We just copied the server Jaspal in the package and here we are first going to build Java application
into a jar file and then we're going to copy that into that destination folder inside the container.
And again, we're setting this folder as a route inside container so that we can reference the Java
file without full path like this.
So we don't need that anymore.
We can just say the name of the jar.
Right.
And this is, again, just like we would run it locally.
It's Java, Java and the Java.
No, we don't have the Java yet in the built folder because we don't have a built folder.
So in order to do that, we first have to build the application.
I also have that guide or those actually three commands in the read me so you can copy that from there.
So the first step to build the image is we build the application itself using gradle repr.
Again, this is equivalent to May one package or install.
And here we have the bill folder, if I go inside, I have this leap's directory and here is my Zha
file, right.
So now I have the jar file that I'm referencing right here so I can build the docker image Docker built
and again, know that I'm in the root folder and my docker files also in the root folder, because this
dot is actually relative to where I'm executing the command from an inside route.
So this is a wrong name here.
Should be Java.
So let's correct that.
So now let's do it again.
And there you go.
All five commands got executed, successfully built our image.
Let's go back and check our images.
Duncker images.
Its grip on EBP.
And here are our both images.
So the next step, we're going to push them to a private repository.