Ask a question from expert

Ask now

Java Programming with Spring Boot Framework

5 Pages580 Words442 Views
   

Added on  2023-04-22

About This Document

This document explains the use of Spring Boot Framework to create a web application using Spring Boot Maven plugin, Spring MVC, and Spring Boot Security. It also provides instructions on how to run the code using IntelliJ IDE.

Java Programming with Spring Boot Framework

   Added on 2023-04-22

BookmarkShareRelated Documents
Running head: JAVA PROGRAMMING 1
The project uses a java framework called Spring Boot
Clients Name
Affiliate Institution
Date
Java Programming with Spring Boot Framework_1
2
It uses maven to manage dependencies used across the application. In the Pom.xml file
inside <build></build> tag, spring boot maven plugin artifact is defined. The spring boot maven
plugin consolidates the jar files in the projects and builds a single executable jar. When running
the application, it is the spring boot plugin that finds the main method that is public static void
function main () in the Application.java class and make the class runnable.
The web pages that makes up a web application are located in the src/main/resources/templates/
directory. The web pages are login.html and home.html. The login html file has the login form
and css. The home html file contains welcome message and logout link.
The web application made by the two html pages are based on Spring MVC (Model View
Controller). The Spring MVC together with view controllers have been configured in the
config/WebConfig class to expose the template files. The addViewControllers method in the
config/WebConfig class adds two view controllers. The two view controllers are
I. home view which is defined in home.html file
Ii login view which is defined in login.html
In order to go to home page the user must login with correct username and password. In
the code, security has been set up using spring-boot-starter-security dependency defined in the
pom.xml file. The security configuration is in the config/WebSecurityConfig.java class. The user
login credentials i.e. username and password. When the user inputs wrong username or wrong
password. The user won't be able to login. The spring boot security links the login credentials
keyed by the user on the login page to the security functionality defined in the
WebConfigSecurity class.
Java Programming with Spring Boot Framework_2

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents
It’s a php CodeIgniter and the first part completed.
|2
|448
|466

Assignment about MCTC School of Technology Security Labs.
|18
|2938
|23