The primary motivation behind developing Spring Boot is to simplify the process for configuring and deploying the spring applications. Spring Boot will get rid of all the fuss involved on configuring the dependencies for building the enterprise applications. In Spring based applications, configurations are loaded with a bunch of XML files, now these configurations should not be maintained in a separate file which is extra work for the developers. Developers need to focus on only writing the application while Spring Boot will simplify the deployment process by packaging and deploying application without any explicit configurations.

You may also read Spring Boot MVC with Tiles and AJAX and https://www.jeejava.com/spring-mvc-and-jdbc-crud-with-zero-xml/

More information can be found here http://projects.spring.io/spring-boot/

Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can “just run”. We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.
Features

Create stand-alone Spring applications
Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
Provide opinionated ‘starter’ POMs to simplify your Maven configuration
Automatically configure Spring whenever possible
Provide production-ready features such as metrics, health checks and externalized configuration
Absolutely no code generation and no requirement for XML configuration

The reference guide includes detailed descriptions of all the features http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/.

Prerequisites

The following configurations are required in order to run the application

Eclipse Kepler
JDK 1.8
Tomcat 8
Have maven 3 installed and configured
Spring 4 dependencies in pom.xml

Now we will see the below steps how to create a maven based project in Eclipse

Step 1. Create a maven based web project in Eclipse

Go to File -> New -> Other. On popup window under Maven select Maven Project. Then click on Next. Select the workspace location – either default or browse the location. Click on Next. Now in next window select the row as highlighted from the below list of archtypes and click on Next button.

maven-arctype-webapp

Now enter the required fields (Group Id, Artifact Id) as shown below

Group Id : com.roytuts
Artifact Id : spring-boot

The final project looks like below

spring boot

Step 2. Modify the pom.xml file as shown below.

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>com.roytuts</groupId>
	<artifactId>spring-boot</artifactId>
	<packaging>war</packaging>
	<version>0.0.1-SNAPSHOT</version>
	<name>spring-boot Maven Webapp</name>

	<url>http://maven.apache.org</url>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.4.0.RELEASE</version>
	</parent>

	<properties>
		<java.version>1.8</java.version>
	</properties>

	<dependencies>

		<!-- mysql java connector -->
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>

		<!-- jstl -->
		<dependency>
			<groupId>org.apache.tomcat.embed</groupId>
			<artifactId>tomcat-embed-jasper</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-jdbc</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>

	<build>
		<finalName>spring-boot</finalName>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
			</plugin>
		</plugins>
	</build>
</project>

Step 3. If you see JRE System Library[J2SE-1.5] then change the version by below process

Do right-click on the project and go to Build -> Configure build path, under Libraries tab click on JRE System Library[J2SE-1.5], click on Edit button and select the appropriate jdk 1.8 from the next window. Click on Finish then Ok.

Change also the Compiler compliance level as 1.8 from Java -> Compiler.

Step 4. Now when the build process finished then delete web.xml file from WEB-INF

Step 5. Create application.properties file put under src/main/resources

#database configuration
spring.datasource.url=jdbc:mysql://localhost:3306/roytuts
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=com.mysql.jdbc.Driver

#view resolver
spring.mvc.view.prefix=/views/
spring.mvc.view.suffix=.jsp

Step 6. Create a directory called views under src/main/webapp directory for putting jsp views.

Step 7. Create MySQL table teacher in database roytuts

USE `roytuts`;

/*Table structure for table `teacher` */

DROP TABLE IF EXISTS `teacher`;

CREATE TABLE `teacher` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `expertise` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Step 8. Dump some data into the table

insert  into `teacher`(`id`,`name`,`expertise`) 
values (16,'Bibhas Chandra Dhara','Statistics'),
(18,'UKR','System Programming'),(19,'New','Expert');

Step 9. Now create POJO class and mapper class which will map Java object to database table teacher

package com.roytuts.spring.boot.model;

public class Teacher {

	private int id;
	private String name;
	private String expertise;

	public Teacher() {
	}

	public Teacher(int id, String name, String expertise) {
		this.id = id;
		this.name = name;
		this.expertise = expertise;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getExpertise() {
		return expertise;
	}

	public void setExpertise(String expertise) {
		this.expertise = expertise;
	}

	@Override
	public String toString() {
		return "Teacher [id=" + id + ", name=" + name + ", expertise=" + expertise + "]";
	}

}

Step 10. Create Mapper class for mapping database table row to Java object

package com.roytuts.spring.boot.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.roytuts.springmvc.model.Teacher;

public class TeacherRowMapper implements RowMapper<Teacher> {

	@Override
	public Teacher mapRow(ResultSet rs, int row) throws SQLException {
		Teacher teacher = new Teacher();
		teacher.setId(rs.getInt("id"));
		teacher.setName(rs.getString("name"));
		teacher.setExpertise(rs.getString("expertise"));
		return teacher;
	}

}

Step 11. Create DAO class for querying database table

package com.roytuts.spring.boot.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import com.roytuts.springmvc.mapper.TeacherRowMapper;
import com.roytuts.springmvc.model.Teacher;

@Repository
@Transactional
public class TeacherDao {

	@Autowired
	private JdbcTemplate jdbcTemplate;

	public Teacher getTeacher(final int id) {
		Teacher teacher = jdbcTemplate.queryForObject("select * from teacher where id = ?", new Object[] { id },
				new TeacherRowMapper());
		return teacher;
	}

	public List<Teacher> getTeachers() {
		List<Teacher> teachers = jdbcTemplate.query("select * from teacher", new TeacherRowMapper());
		return teachers;
	}

	public void addTeacher(final Teacher teacher) {
		jdbcTemplate.update("insert into teacher(name, expertise) values(?, ?)",
				new Object[] { teacher.getName(), teacher.getExpertise() });
	}

	public void updateTeacher(final Teacher teacher) {
		jdbcTemplate.update("update teacher set name = ?, expertise = ? where id = ?",
				new Object[] { teacher.getName(), teacher.getExpertise(), teacher.getId() });
	}

	public void deleteTeacher(final int id) {
		jdbcTemplate.update("delete from teacher where id = ?", new Object[] { id });
	}

}

Step 12. Create the service class for processing logic or business logic

package com.roytuts.spring.boot.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.roytuts.springmvc.dao.TeacherDao;
import com.roytuts.springmvc.model.Teacher;

@Service
public class TeacherService {

	@Autowired
	private TeacherDao teacherDao;

	public Teacher getTeacher(final int id) {
		return teacherDao.getTeacher(id);
	}

	public List<Teacher> getTeachers() {
		return teacherDao.getTeachers();
	}

	public void addTeacher(final Teacher teacher) {
		teacherDao.addTeacher(teacher);
	}

	public void updateTeacher(final Teacher teacher) {
		teacherDao.updateTeacher(teacher);
	}

	public void deleteTeacher(final int id) {
		teacherDao.deleteTeacher(id);
	}

}

Step 13. Create Spring controller class which will handle user request and response

package com.roytuts.spring.boot.controllers;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.roytuts.springmvc.model.Teacher;
import com.roytuts.springmvc.service.TeacherService;

@Controller
public class TeacherController {

	@Autowired
	private TeacherService teacherService;

	@RequestMapping("/teacher/{id}") // by default Requestmethod is GET
	public String getTeacher(@PathVariable int id, ModelMap teacherModel) {
		Teacher teacher = teacherService.getTeacher(id);
		teacherModel.addAttribute("teacher", teacher);
		return "teacher";
	}

	@RequestMapping(value = "/teachers", method = RequestMethod.GET)
	public String getTeachers(ModelMap teacherModel) {
		List<Teacher> teachers = teacherService.getTeachers();
		teacherModel.addAttribute("teachers", teachers);
		return "teachers";
	}

	@RequestMapping(value = "addTeacher")
	public String addPage() {
		return "add";
	}

	@RequestMapping(value = "/add/teacher", method = RequestMethod.POST)
	public String addTeacher(@RequestParam(value = "name", required = true) String name,
			@RequestParam(value = "expertise", required = true) String expertise, ModelMap teacherModel) {
		Teacher teacher = new Teacher();
		teacher.setName(name);
		teacher.setExpertise(expertise);
		teacherService.addTeacher(teacher);
		teacherModel.addAttribute("msg", "Teacher added successfully");
		List<Teacher> teachers = teacherService.getTeachers();
		teacherModel.addAttribute("teachers", teachers);
		return "teachers";
	}

	@RequestMapping(value = "update/teacher/{id}", method = RequestMethod.GET)
	public String updatePage(@PathVariable("id") int id, ModelMap teacherModel) {
		teacherModel.addAttribute("id", id);
		Teacher teacher = teacherService.getTeacher(id);
		teacherModel.addAttribute("teacher", teacher);
		return "update";
	}

	@RequestMapping(value = "/update/teacher", method = RequestMethod.POST)
	public String updateTeacher(@RequestParam int id, @RequestParam(value = "name", required = true) String name,
			@RequestParam(value = "expertise", required = true) String expertise, ModelMap teacherModel) {
		Teacher teacher = new Teacher();
		teacher.setId(id);
		teacher.setName(name);
		teacher.setExpertise(expertise);
		teacherService.updateTeacher(teacher);
		List<Teacher> teachers = teacherService.getTeachers();
		teacherModel.addAttribute("teachers", teachers);
		teacherModel.addAttribute("id", id);
		teacherModel.addAttribute("msg", "Teacher updated successfully");
		return "teachers";
	}

	@RequestMapping(value = "/delete/teacher/{id}")
	public String deleteTeacher(@PathVariable int id, ModelMap teacherModel) {
		teacherService.deleteTeacher(id);
		List<Teacher> teachers = teacherService.getTeachers();
		teacherModel.addAttribute("teachers", teachers);
		teacherModel.addAttribute("msg", "Teacher delted successfully");
		return "teachers";
	}

}

Step 14. Now create teacher.jsp file under webapp/views directory for displaying single teacher details

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<html>
<title>Spring Boot Example</title>
<body>
	<h2>Spring Boot Example</h2>
	Id : ${teacher.id}
	<br /> Name : ${teacher.name}
	<br /> Expertise : ${teacher.expertise}
</body>
</html>

Step 15. Create teachers.jsp file under webapp/views directory for displaying all teachers details

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<title>Spring Boot Example</title>
<body>
	<h2>Spring Boot Example</h2>
	<c:if test="${not empty msg}">
        ${msg}
    </c:if>
	<c:choose>
		<c:when test="${teachers != null}">
			<h3>List of Teachers</h3>
			<table cellpadding="5" cellspacing="5">
				<thead>
					<tr>
						<th>ID</th>
						<th>Name</th>
						<th>Expertise</th>
						<th>Actions</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach var="t" items="${teachers}">
						<tr>
							<td>${t.id}</td>
							<td>${t.name}</td>
							<td>${t.expertise}</td>
							<td><a
								href="<%=request.getContextPath()%>/update/teacher/${t.id}">Update</a>
								&nbsp; <a
								href="<%=request.getContextPath()%>/delete/teacher/${t.id}"
								onclick="return confirm('Do you really want to delete?')">Delete</a></td>
						</tr>
					</c:forEach>
				</tbody>
			</table>
		</c:when>
		<c:otherwise>
        No User found in the DB!
        </c:otherwise>
	</c:choose>
</body>
</html>

Step 16. Create add.jsp file under webapp/views directory for adding new teacher

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<title>Spring Boot Example</title>
<body>
	<h2>Spring Boot Example</h2>
	<c:if test="${not empty msg}">
        ${msg}
    </c:if>
	<h3>Add User</h3>
	<form method="POST" name="add_teacher"
		action="<%=request.getContextPath()%>/add/teacher">
		Name: <input name="name" value="${name}" type="text" /> <br /> <br />
		Expertise: <input name="expertise" value="${expertise}" type="text" />
		<br /> <br />
		<input value="Add Teacher" type="submit" />
	</form>
</body>
</html>

Step 17. Create update.jsp file under webapp/views directory for updating new teacher

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<title>Spring Boot Example</title>
<body>
	<h2>Spring Boot Example</h2>
	<c:if test="${not empty msg}">
        ${msg}
    </c:if>
	<h3>Update User</h3>
	<form method="POST" name="update_teacher"
		action="<%=request.getContextPath()%>/update/teacher">
		<input hidden="hidden" name="id" value="${id}" type="text" /> Name: <input
			name="name" value="${teacher.name}" type="text" /> <br /> <br />
		Expertise: <input name="expertise" value="${teacher.expertise}"
			type="text" /> <br /> <br /> <input value="Update User"
			type="submit" />
	</form>
</body>
</html>

Step 20. Now create a main class which will run the spring-boot application

package com.roytuts.spring.boot.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
@ComponentScan(basePackages = "com.roytuts.spring.boot")
public class SpringBootTeacherApplication {

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

}

The @SpringBootApplication annotation is equivalent to using @Configuration, @EnableAutoConfiguration and @ComponentScan with their default attributes. The @SpringBootApplication indicates a configuration class that declares one or more @Bean methods and also triggers auto-configuration and component scanning.

The @ComponentScan annotation tells Spring to search recursively through the com.roytuts.spring.boot package and its children for classes marked directly or indirectly with Springs @Controller, @Service, @Repository etc. annotations.

Step 21. Now run the SpringBootTeacherApplication class and when the application successfully deployed onto the server you will see below output in the console.

  .   ____          _            __ _ _
 / / ___'_ __ _ _(_)_ __  __ _    
( ( )___ | '_ | '_| | '_ / _` |    
 /  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |___, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.4.0.RELEASE)

2016-08-11 08:11:16.738  INFO 1028 --- [           main] c.r.s.b.t.SpringBootTeacherApplication   : Starting SpringBootTeacherApplication on admin-PC with PID 1028 (D:mars_workspacespring-boottargetclasses started by moni in D:mars_workspacespring-boot)
2016-08-11 08:11:16.741  INFO 1028 --- [           main] c.r.s.b.t.SpringBootTeacherApplication   : No active profile set, falling back to default profiles: default
2016-08-11 08:11:16.939  INFO 1028 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@9cd3b1: startup date [Thu Aug 11 08:11:16 IST 2016]; root of context hierarchy
2016-08-11 08:11:18.835  INFO 1028 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [class org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$6ad51a5c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-08-11 08:11:19.479  INFO 1028 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-08-11 08:11:19.497  INFO 1028 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2016-08-11 08:11:19.498  INFO 1028 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.4
2016-08-11 08:11:19.989  INFO 1028 --- [ost-startStop-1] org.apache.jasper.servlet.TldScanner     : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2016-08-11 08:11:20.015  INFO 1028 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2016-08-11 08:11:20.015  INFO 1028 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 3080 ms
2016-08-11 08:11:20.264  INFO 1028 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2016-08-11 08:11:20.267  INFO 1028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-08-11 08:11:20.268  INFO 1028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-08-11 08:11:20.268  INFO 1028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-08-11 08:11:20.268  INFO 1028 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2016-08-11 08:11:21.014  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@9cd3b1: startup date [Thu Aug 11 08:11:16 IST 2016]; root of context hierarchy
2016-08-11 08:11:21.177  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/addTeacher]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.addPage()
2016-08-11 08:11:21.180  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/teacher/{id}]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.getTeacher(int,org.springframework.ui.ModelMap)
2016-08-11 08:11:21.181  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/teachers],methods=[GET]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.getTeachers(org.springframework.ui.ModelMap)
2016-08-11 08:11:21.181  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/add/teacher],methods=[POST]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.addTeacher(java.lang.String,java.lang.String,org.springframework.ui.ModelMap)
2016-08-11 08:11:21.181  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/update/teacher/{id}],methods=[GET]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.updatePage(int,org.springframework.ui.ModelMap)
2016-08-11 08:11:21.181  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/update/teacher],methods=[POST]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.updateTeacher(int,java.lang.String,java.lang.String,org.springframework.ui.ModelMap)
2016-08-11 08:11:21.181  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/delete/teacher/{id}]}" onto public java.lang.String com.roytuts.spring.boot.controllers.TeacherController.deleteTeacher(int,org.springframework.ui.ModelMap)
2016-08-11 08:11:21.186  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2016-08-11 08:11:21.187  INFO 1028 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2016-08-11 08:11:21.258  INFO 1028 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-08-11 08:11:21.258  INFO 1028 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-08-11 08:11:21.377  INFO 1028 --- [           main] o.s.w.s.handler.SimpleUrlHandlerMapping  : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2016-08-11 08:11:21.718  INFO 1028 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Registering beans for JMX exposure on startup
2016-08-11 08:11:22.041  INFO 1028 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2016-08-11 08:11:22.053  INFO 1028 --- [           main] c.r.s.b.t.SpringBootTeacherApplication   : Started SpringBootTeacherApplication in 6.306 seconds (JVM running for 7.288)

Please look at the console carefully, you would see, the server has been started on port 8080 with context path “/”.

Step 22. Now hit the URL http://localhost:8080/teachers , you will below output in the browser

spring boot

You can try to update, delete from the links.

Step 23. If you hit http://localhost:8080/teacher/16, you would get below output

spring boot

Step 24. You can add new teacher using URL http://localhost:8080/addTeacher

Thanks for reading.

Tags:

I am a professional Web developer, Enterprise Application developer, Software Engineer and Blogger. Connect me on Roy Tutorials | TwitterFacebook Google PlusLinkedin | Reddit

0 thoughts on “Spring Boot MVC with Maven

  1. Good lecturer, good course. So far so good. Could please post some tutorials how to configure spring tiles and AjaxUrl Based View Resolver using Spring boots.

Leave a Reply

Your email address will not be published. Required fields are marked *