Skip to content

Commit

Permalink
FirstCommit-Willmostofthefiles-WhataSurprise?
Browse files Browse the repository at this point in the history
  • Loading branch information
Ranga Rao Karanam authored and Ranga Rao Karanam committed Jan 5, 2017
1 parent d522a66 commit 60c6cc3
Show file tree
Hide file tree
Showing 53 changed files with 10,475 additions and 0 deletions.
142 changes: 142 additions & 0 deletions README.md
@@ -0,0 +1,142 @@
# Your First Web Application with Spring Boot
Develop your first web application with Spring Boot in more than 25 steps
* [Installing Eclipse, Maven and Java](#installing-tools)
* [Course Overview](#course-overview)
* [About in28Minutes](#about-in28minutes)
- [Our Beliefs](#our-beliefs)
- [Our Approach](#our-approach)
- [Find Us](#useful-links)
- [Other Courses](#other-courses)

##Installing Tools
- PDF : https://github.com/in28minutes/SpringIn28Minutes/blob/master/InstallationGuide-JavaEclipseAndMaven_v2.pdf
- Video : https://www.youtube.com/watch?v=DLPjCZ5n_SM

##Course Overview

###Introduction
Developing your first Spring Boot Web Application is fun.

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.

In this course, you will learn the basics developing a Basic Todo Management Application using Spring Boot with Login and Logout functionalities.

You will build the website step by step - in more than 25 steps. This course would be a perfect first step as an introduction to Java Web Application Development.

You will be using Spring (Dependency Management), Spring MVC, Spring Boot, Spring Security (Authentication and Authorization), BootStrap (Styling Pages), Maven (dependencies management), Eclipse (IDE) and Tomcat Embedded Web Server. We will help you set up each one of these.

You will learn about
- Basics of Spring Boot
- Basics of Autoconfiguration and Spring Boot Magic
- DispatcherServlet
- Basic Todo Management Application with Login/Logout
- Model, Controllers, ViewResolver and Filters
- Forms - DataBinding, Validation
- Annotation based approach - @RequestParam, @PathVariable, @ModelAttribute, @SessionAttributes etc
- Bootstrap to style the page
- Spring Security
- Internationalization
- Exception Handling
- Basic REST Services

###Step wise details
- Step 01: Basic Spring Boot Web Application Setup
- Step 02: First Spring MVC Controller, @ResponseBody, @Controller
- Step 03: Demystifying some of the Spring Boot magic
- Step 04: Redirect to Login JSP - LoginController, @ResponseBody and View Resolver
- Step 05: Show userid and password on the welcome page - ModelMap and @RequestParam
- Step 06: DispatcherServlet and Spring MVC Flow
- Step 07: Your First HTML form
- Step 08: Add hard-coded validation of userid and password
- Step 09: Magic of Spring
- Step 10: Create TodoController and list-todos view. Make TodoService a @Service and inject it.
- Step 11: Architecture of Web Applications
- Step 12: Session vs Model vs Request - @SessionAttributes
- Step 13: Add new todo
- Step 14: Display Todos in a table using JSTL Tags
- Step 15: Bootstrap for Page Formatting using webjars
- Step 16: Let's delete a Todo
- Step 17: Format Add Todo Page and Adding Basic HTML5 form validation
- Step 18: Introduce JSR 349 Validations using Hibernate Validator - First Command Bean.
- Step 19: Updating a todo
- Step 20: Let's add a Target Date for Todo - Use initBinder to Handle Date Fields
- Step 21: JSP Fragments and Navigation Bar
- Step 22: Preparing for Spring Security
- Step 23: Initial Spring Security Setup
- Step 24: Refactor and add Logout Functionality using Spring Security
- Step 25: Exception Handling
- Step 26: Basic Spring Rest Services - @RestController and jackson-databind
- Step 27: More Rest Services - @PathVariable
We do NOT interact with a Database in this Beginner’s Course.

###Expectations
- You should know Java. You should understand usage of Annotations.
- You should understand the basics of Spring framework.
- A basic understanding of JPA, Spring Security will be useful.
- You are NOT expected to have any experience with Eclipse or Maven.
- We will help you install Eclipse and get up and running with Maven.

##Let's have some fun
- What are we waiting for?
- Let's have some fun with Spring Boot in 25 Steps.
- I had fun creating this course and hope you would too.
- Thanks for your interest in Our Course
- I hope you’re as excited as I am!
- If you’re ready to learn more and sign up for the course,
- go ahead and hit that Enroll button,
- or take a test drive by using the Free Preview feature.
- See you in the course!

##About in28Minutes
- At in28Minutes, we ask ourselves one question everyday. How do we help you learn effectively - that is more quickly and retain more of what you have learnt?
- We use Problem-Solution based Step-By-Step Hands-on Approach With Practical, Real World Application Examples.
- Our success on Udemy and Youtube (2 Million Views & 12K Subscribers) speaks volumes about the success of our approach.
- While our primary expertise is on Development, Design & Architecture Java & Related Frameworks (Spring, Struts, Hibernate) we are expanding into the front-end world (Bootstrap, JQuery, Angular JS).

###Our Beliefs
- Best Courses are interactive and fun.
- Foundations for building high quality applications are best laid down while learning.

###Our Approach
- Problem Solution based Step by Step Hands-on Learning
- Practical, Real World Application Examples.
- We use 80-20 Rule. We discuss 20% things used 80% of time in depth. We touch upon other things briefly equipping you with enough knowledge to find out more on your own.
- We will be developing a demo application in the course, which could be reused in your projects, saving hours of your effort.
- We love open source and therefore, All our code is open source too and available on Github.

###Useful Links
- [Our Website](http://www.in28minutes.com)
- [Youtube Courses](https://www.youtube.com/user/rithustutorials/playlists)
- [Udemy Courses](https://www.udemy.com/user/in28minutes/)
- [Facebook](http://facebook.com/in28minutes)
- [Twitter](http://twitter.com/in28minutes)
- [Google Plus](https://plus.google.com/u/3/110861829188024231119)

###Other Courses
- [Spring Framework](https://www.udemy.com/spring-tutorial-for-beginners/)
- [Maven](http://www.in28minutes.com/p/maven-tutorial-for-beginners.html)
- [Eclipse](http://www.in28minutes.com/p/eclipse-java-video-tutorial.html)
- Java
* [Java](https://www.youtube.com/watch?v=Y4ftqcYVh5I&list=PLE0D4634AE2DFA591&index=1)
* [Java Collections](http://www.in28minutes.com/p/java-collections-framework-video.html)
* [Java OOPS Concepts](https://www.udemy.com/learn-object-oriented-programming-in-java/)
- [Design Patterns](http://www.in28minutes.com/p/design-patterns-tutorial.html)
- [JUnit](https://www.udemy.com/junit-tutorial-for-beginners-with-java-examples/)
- [C](https://www.udemy.com/c-tutorial-for-beginners-with-puzzles/)
- [C Puzzles](https://www.udemy.com/c-puzzles-for-beginners/)
- [Javascript](https://www.youtube.com/watch?v=6TZdD-FR6CY)
- [More Courses on Udemy](https://www.udemy.com/user/in28minutes/)
* Java Servlets and JSP : Your first web application in 25 Steps
* Learn Spring MVC in 25 Steps
* Learn Struts in 25 Steps
* Learn Hibernate in 25 Steps
* 10 Steps to Professional Java Developer
- [Java Interview Guide](http://www.in28minutes.com/p/buy-our-java-interview-guide.html)
* Core Java
* Advanced Java
* Spring, Spring MVC
* Struts
* Hibernate
* Design Patterns
* 400+ Questions
* 23 Videos
69 changes: 69 additions & 0 deletions Step01.md
@@ -0,0 +1,69 @@
##What You Will Learn during this Step:
- Lets create a simple web application using Spring Boot
- Lets run the Spring Boot Application
- There is a lot of magic happening in here! We will take a deep dive into the magic in Step 03.

## Files List
### /pom.xml
```
<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>com.in28minutes.springboot.web</groupId>
<artifactId>Spring-Boot-First-Web-Application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
```
### /src/main/java/com/in28minutes/springboot/web/controller/WebApplication.java
```
package com.in28minutes.springboot.web.controller;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
@SpringBootApplication
public class WebApplication {
public static void main(String[] args) {
ApplicationContext ctx = SpringApplication.run(WebApplication.class, args);
}
}
```
119 changes: 119 additions & 0 deletions Step02.md
@@ -0,0 +1,119 @@
##What You Will Learn during this Step:
- @RequestMapping(value = "/login", method = RequestMethod.GET)
- http://localhost:8080/login
- Why @ResponseBody?
- Important of RequestMapping method
- How do web applications work? Request and Response
- Browser sends Http Request to Web Server
- Code in Web Server => Input:HttpRequest, Output: HttpResponse
- Web Server responds with Http Response

## Useful Snippets and References
First Snippet
```
@Controller
public class LoginController {
@RequestMapping(value = "/login")
@ResponseBody
public String sayHello() {
return "Hello World dummy";
}
}
```
## Exercises
- Create another method with a different mapping returning some other text!

## Files List
### /pom.xml
```
<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>com.in28minutes.springboot.web</groupId>
<artifactId>Spring-Boot-First-Web-Application</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
```
### /src/main/java/com/in28minutes/springboot/web/controller/WebApplication.java
```
package com.in28minutes.springboot.web.controller;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;
@SpringBootApplication
public class WebApplication {
public static void main(String[] args) {
ApplicationContext ctx = SpringApplication.run(WebApplication.class, args);
}
}
```
### /src/main/java/com/in28minutes/springboot/web/LoginController.java
```
package com.in28minutes.springboot.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
/*
* Browser sends Http Request to Web Server
*
* Code in Web Server => Input:HttpRequest, Output: HttpResponse
* JEE with Servlets
*
* Web Server responds with Http Response
*/
@Controller
public class LoginController {
@RequestMapping(value = "/login")
@ResponseBody
public String sayHello() {
return "Hello World dummy";
}
}
```
6 changes: 6 additions & 0 deletions Step03.md
@@ -0,0 +1,6 @@
##What You Will Learn during this Step:
- Demystifying some of the magic
- Spring Boot Starter Parent
- Spring Boot Starter Web
- Embedded Tomcat
- Dev Tools

0 comments on commit 60c6cc3

Please sign in to comment.