Skip to main content

Posts

Spring Security with Boot - Adding LDAP Over Already Authenticated User from One Module

There are hundreds of Spring Tutorials and Stack of Questions/Answers online to add LDAP based Authentication in your web application using Spring Security However, while working on one of my project assignments, I faced a strange conundrum whereas per the requirements of the application the REST-based application is required to be accessed from within a spring based web application of which this Rest API app. will be part of and also independently hosted for outside application or for 3rd Party Access. Let's make some assumptions here for the sake of better understanding the issue/s and resolution/s Main web-app as MWAPP Rest Based API Module as RESTAPP MWAPP is based on Spring MVC with Spring Security and all configuration based RESTAPP is Spring Boot based Simple Web App. Issues:: MWAPP is having LDAP Security using spring config xml file as users can use this app with some features which does nt need API exposed in RESTAPP hence user logs in and is LDAP authe
Recent posts

Spring OXM

Spring's Object/XML Mapping support : Converting an XML document to and from an object. This conversion process is also known as XML Marshalling, or XML Serialization. a marshaller is responsible for serializing an object (graph) to XML an unmarshaller deserializes the XML to an object graph <oxm:jaxb2-marshaller id="anyWSMarshaller" contextPath="com.utkarsh.org.phase2.jaxbgenerated"/> <bean id="anyServiceTemplate" class="org.springframework.ws.client.core.WebServiceTemplate"> <property name="marshaller" ref="acbsPaymentsAdvancesWSMarshaller"/> <property name="unmarshaller" ref="acbsPaymentsAdvancesWSMarshaller"/> <property name="defaultUri" value="http://localhost:8080/SpringOXMApp/anyUrl/testService"/> <property name="messageSenders">  <list>   <ref bean="httpMsgSende

Spring MVC

++++++++++++++++++++++++++++ Spring Web MVC framework ++++++++++++++++++++++++++++ The Spring Web model-view-controller (MVC) framework is designed around a DispatcherServlet that dispatches requests to handlers, with configurable handler mappings, view resolution, locale, time zone and theme resolution as well as support for uploading files. a) With the introduction of Spring 3.0, the @Controller mechanism also allows you to create RESTful Web sites and applications, through the @PathVariable annotation and other features b) Upon initialization of a DispatcherServlet, Spring MVC looks for a file named [servlet-name]-servlet.xml in the WEB-INF directory of your web application and creates the beans defined there, overriding the definitions of any beans defined with the same name in the global scope. c) For Spring based validation at controller level - An @RequestBody method parameter can be annotated with @Valid, in which case it will be validated using the co