Showing posts with label Spring. Show all posts
Showing posts with label Spring. Show all posts

Friday, 14 July 2017

Spring MVC Java Config : Part 5 Secure RESTful API with Spring Security OAuth2

The OAuth 2.0 authorization framework enables a third-party application to obtain limited access to an HTTP service, either on behalf of a resource owner by orchestrating an approval interaction between the resource owner and the HTTP service, or by allowing the third-party application to obtain access on its own behalf.

Monday, 10 July 2017

Spring MVC Java Config : Part 4 Spring Security for Web Application

There are two main areas for application securities :    Authentication: Process of checking the user, who they claim to be.    
Authorization: Process of deciding whether an user is allowed to perform an activity within the application.

Thursday, 6 July 2017

Spring MVC Java Config : Part 3 RESTful Web Services


REST stands for Representational State Transfer.

It’s an is an architectural style which can be used to design web services, that can be consumed from a variety of clients.

The core idea is that, rather than using complex mechanisms such as CORBA, RPC or SOAP to connect between machines, simple HTTP/HTTPS is used to make calls among them.

Wednesday, 5 July 2017

Spring MVC Java Config : Part 2 Bean Validation and Exception Handler


It is always good to check the validity and integrity of form data before passing to business logic, let's see how to do it.



Spring MVC Java Config : Part 1 Bootstrapping a Web Application

It actually becomes confusing to me when  java config is introduced in Spring 4 as any class could be used to initiate a bean container.

Hope this and following posts would be helpful to us all.

Monday, 26 June 2017

SSL with Embedded Tomcat without Spring Boot


In previous post, we have talked about how to have embedded tomcat without spring boot, now let see how to  enable SSL with embedded tomcat.

Sunday, 18 June 2017

Spring with Embedded Tomcat without Spring Boot


Because of service-oriented architecture style, instead of a monolithic application , you may have several independent applications can run on their own.Let's see how to have a Spring powered standalone application with embedded Tomcat without Spring boot.


Tuesday, 6 June 2017

Reverse Engineering : Generate Java Persistence Entity from Database

If there is already an existing database , then we could use some reverse engineering tool to automatically generate java persistence entity classes.

You may find below 2 ways from internet :
1. hibernate*-maven-plugin
2. IDE based reverse engine tools

This post would show you how to do it programmatically.



Sunday, 4 June 2017

Run Spring as Standalone Application Without Spring Boot



It seems that nowadays most of sample codes provided by https://spring.io/blog are all done with Spring Boot, so this post would show you how to write a standalone application with Spring and without Spring Boot.

Thursday, 11 May 2017

Monday, 12 January 2015

JBoss Fuse : Spring managed Quartz


Let's assume you have some basic knowledge of osgi ,and want to deploy your Spring powered batch job into JBoss Fuse.


Step 1 : connecting to the right maven repository

    com.springsource.repository.bundles.release
    EBR Spring Release Repository
    http:// repository.springsource.com/maven/bundles/release


    com.springsource.repository.bundles.external
    EBR External Release Repository
    http:// repository.springsource.com/maven/bundles/external

Wednesday, 10 December 2014

Spring MVC : Preventing Duplicate Form Submission without Spring Security



Spring MVC so far has no out of box solution to prevent duplicate form submission yet , while below are the possible solutions :

Option 1 , javascript : disable submit button 


Option 2 , Post-Redirect-Get pattern : send a redirect after submit 


Option 3 , tokening : unique token between client and server 


Both option 1 and option 2 have drawbacks , let's see how to implement option 3.

Flag Counter