spring boot + Spring MVC + Maven + JSP example

Spring boot jsp example Directory Structure pom.xml file Modify auto created POM file. We need to add parent in pom to make it a spring boot application. After that add spring-boot-starter-web dependency and java version. <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>   <groupId>codesjava</groupId> <artifactId>SpringBoot02</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging>   <name>SpringBoot02</name> <url>http://maven.apache.org</url>   <properties> <java.version>1.8</java.version> </properties>   <parent> … Read more

Spring boot hello world

Spring boot hello world example Directory Structure pom.xml file Modify auto created POM file. We need to add parent in pom to make it a spring boot application. After that add spring-boot-starter-web dependency and java version. <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/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion>   <groupId>codesjava</groupId> <artifactId>SpringBoot01</artifactId> <version>0.0.1-SNAPSHOT</version> <packaging>jar</packaging>   <name>SpringBoot01</name> <url>http://maven.apache.org</url>   <properties> <java.version>1.8</java.version> </properties>   … Read more

Run spring boot application from command line

We can run spring boot application from command line by using below command on command line. java -jar springbootapp.jar We can also pass properties as arguments like port number. java -jar springbootapp.jar \ –server.port=8080 \ –site.name=w3schools.com

Spring boot web app configuration

As we discussed in earlier tutorials that spring boot will take care of all boilerplate code, so it will provide all configurations automatically. But we can change the default configurations. Spring boot change default tomcat port Default HTTP port in spring boot application is 8080. We can change it by overriding the default port in … Read more

Spring boot starter parent in pom maven repo

The parent pom spring-boot-starter-parent, contains the full dependencies (mvc, cache, jpa) and commons properties to maintain dependencies versions in a good consistency, to be used in our project or submodules. <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.0.RELEASE</version> </parent> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.4.0.RELEASE</version> </parent> We can manage the following things with the help of parent pom: Configuration: It maintains … Read more

spring boot architecture diagram and components

  Spring Boot Starters: Main concept behind spring boot starters is to reduce the dependencies definitions and to simplify the project build dependencies. For example : if we are creating spring application than we have to define following dependencies in pom.xml file – Spring core Jar file Spring Web Jar file Spring Web MVC Jar file … Read more

Spring boot overview

Spring boot is a module of spring framework which is used to create stand-alone, production-grade Spring based Applications with minimum programmer’s efforts. It is developed on top of core spring framework. The main concept behind spring boot is to avoid lot of boilerplate code and configuration to improve development, unit test etc. As in case … Read more

spring boot tutorial

Spring boot is a module of spring framework which is used to create stand-alone, production-grade Spring based Applications with minimum programmer’s efforts. It is developed on top of core spring framework. The main concept behind spring boot is to avoid lot of boilerplate code and configuration to improve development, unit test etc. As in case … Read more

Spring security method level

Method Security Spring security also provide the feature of method security i.e. it provides the support for applying access rules to Java method executions. To allow method security, we have to enable method security. Normally, we do it on top level or module level configuration for our app. For a secure method, caller have to … Read more