Scope Of Work Main Building Boiler Replacement Project No: Fill & Download for Free

GET FORM

Download the form

A Premium Guide to Editing The Scope Of Work Main Building Boiler Replacement Project No

Below you can get an idea about how to edit and complete a Scope Of Work Main Building Boiler Replacement Project No in detail. Get started now.

  • Push the“Get Form” Button below . Here you would be introduced into a splashboard allowing you to conduct edits on the document.
  • Choose a tool you want from the toolbar that shows up in the dashboard.
  • After editing, double check and press the button Download.
  • Don't hesistate to contact us via [email protected] for any questions.
Get Form

Download the form

The Most Powerful Tool to Edit and Complete The Scope Of Work Main Building Boiler Replacement Project No

Edit Your Scope Of Work Main Building Boiler Replacement Project No Right Away

Get Form

Download the form

A Simple Manual to Edit Scope Of Work Main Building Boiler Replacement Project No Online

Are you seeking to edit forms online? CocoDoc can help you with its powerful PDF toolset. You can quickly put it to use simply by opening any web brower. The whole process is easy and quick. Check below to find out

  • go to the CocoDoc's free online PDF editing page.
  • Upload a document you want to edit by clicking Choose File or simply dragging or dropping.
  • Conduct the desired edits on your document with the toolbar on the top of the dashboard.
  • Download the file once it is finalized .

Steps in Editing Scope Of Work Main Building Boiler Replacement Project No on Windows

It's to find a default application which is able to help conduct edits to a PDF document. Yet CocoDoc has come to your rescue. View the Manual below to find out possible methods to edit PDF on your Windows system.

  • Begin by acquiring CocoDoc application into your PC.
  • Upload your PDF in the dashboard and make alterations on it with the toolbar listed above
  • After double checking, download or save the document.
  • There area also many other methods to edit your PDF for free, you can check this post

A Premium Handbook in Editing a Scope Of Work Main Building Boiler Replacement Project No on Mac

Thinking about how to edit PDF documents with your Mac? CocoDoc is ready to help you.. It makes it possible for you you to edit documents in multiple ways. Get started now

  • Install CocoDoc onto your Mac device or go to the CocoDoc website with a Mac browser.
  • Select PDF document from your Mac device. You can do so by hitting the tab Choose File, or by dropping or dragging. Edit the PDF document in the new dashboard which includes a full set of PDF tools. Save the file by downloading.

A Complete Manual in Editing Scope Of Work Main Building Boiler Replacement Project No on G Suite

Intergating G Suite with PDF services is marvellous progess in technology, a blessing for you chop off your PDF editing process, making it troublefree and more cost-effective. Make use of CocoDoc's G Suite integration now.

Editing PDF on G Suite is as easy as it can be

  • Visit Google WorkPlace Marketplace and find CocoDoc
  • install the CocoDoc add-on into your Google account. Now you are able to edit documents.
  • Select a file desired by pressing the tab Choose File and start editing.
  • After making all necessary edits, download it into your device.

PDF Editor FAQ

As an avid do it yourself-er, have you started a project that you regretted almost immediately? More importantly, is it completed?

I can only recall two DIY projects that I did not complete. One was a bathtub install for someone else. We got all the details worked out and agreed, even to buying the replacement tub, when it was discovered that the main water supply valve was solidly rusted open and could not be moved with any combination of tools and lubricants available. The only way to do the job without a serious risk of flooding the place would be to shut off the water supply at the road and use serious force (that might destroy the stuck valve), or start cutting the pipework to remove it. The added problem was that doing so would shut off the water for the entire apartment block. This was beyond the scope of my equipment, qualifications or authority, so I said, “Call a real plumber.”The other project was an extension. I finished everything and called for the final inspection. I had been present for all the previous inspections, which had gone perfectly, but I was out at my real job when the inspector came for this one. My wife was there to pass on any comments on the work, and she reported that the inspector had said the flat roof should have been done with hot tar and gravel rather than the cold tar and gravel I had used. I took this to be merely a criticism rather than a reason for a refusing to sign off on the project. I was not sufficiently aware of the process to appreciate that an occupancy permit had not been granted and there was no follow-up, so we blithely used the extension as our kitchen and dining room. When the new owner came to sell (who had bought from us years before without researching the matter), the next buyer’s research brought the inspection issue to light, and it had to be rectified. The new buyer did this after completion by removing the roof and building a second story on top of my work, with a new roof that met inspection.Owing to a persistent combination of ignorance, enthusiasm and overconfidence, there have been projects I regretted starting. They were ultimately resolved through additional research, and extra expenditure in time, materials, tools, and sometimes rework. Those I particularly regret cost me more in time and money than if I had hired a professional, or were ones where I gained insufficiently in knowledge, or skill, or savings to justify accepting the difference between my outcome and a professional standard of workmanship.Then there are the ones so stupidly dangerous that I risked injury or death. The roadside repair where I lost my balance, dropping a jacked up car and missing crushing my lower leg by a such a small fraction that I felt the tug on my jeans as my leg passed between the car sill and the support it was falling onto. Carrying 120 lb of exterior appliance up a 30ft ladder to install on the exterior of a building, and almost losing my balance at the top of the ladder as I moved it into position. Almost falling off the top of a second story chimney while pushing a flexible liner down it (as my friend pulled from below) so we could install an oil fired central heating boiler. Frying my wire cutters on a 240 volt live circuit that should have been off.Experience has taught me some humility and caution, but youtube is a great resource. It has helped me learn to be better prepared, and a little smarter and safer than I used to be.

What is a piping engineer’s responsibility?

PIPING ENGINEERINGPiping engineering is a specialised branch of engineering dealing with design & layouts of piping network along with the equipment's in a process plant.These layouts from a complete blue print of the plant & are used for plant construction at site. The most important factors to be considered are process requirements, safety, operability, maintenance, compliance with statutory requirements & economy.Responsibilities of piping engineerResponsibilities piping design engineer begin with:1) Preparation of plot plan, equipment layouts piping studies, piping specification;2) Review of process package;3) Giving inputs to civil, vessel, electrical / instrumentation groups for various purposes.Goes through:1. Preparation of piping layouts, isometrics, support Drawings;2. Stress analysis3. Procurement assistance;4. Preparation of drawings for statutory approvals;5. Preview of vendor drawings;6. Coordination with various engineering groups & site.And ends with completion & commissioning of plant.Responsibilities of piping engineerMost important documents produced by design engineer:1) Plot plan:Arranging all plant units in a logical manner to take care of Material flow, statutory requirements, & good engineering Practices. -2) Equipment layouts:Document showing layout of all equipment's satisfying the Process requirements, safety & statutory Regulations, operability ease of maintenance & economy.3) Piping layouts:Document showing layouts of piping network to carry fluids From one equipment to another in a process plant satisfying The requirements as mentioned above.Activities of piping design engineer:Review of process package:This activity is carried out prior to start the detail engineering to ensure availability of all the required process data by all engineering groups. This includes the following:1) Process data required converting P & ID’s to piping layouts like a proper identification of valves, strainers, In-line instruments,2) Utility summery giving utility consumption for each equipment with duty conditions like pressure, temperature etc.,3) Conceptual equipment layout drawings for process plant reflecting the process constraints.4) Process data sheets for equipments.5) Hazardous area classification etc..Design planning:Following information is required for planning the various design activities:1) Contract instructions,2) Project design basis & scope of work,3) Basic engineering Documents.4) Site design data including facilities around the plot,5) Contour & survey drawing,6) Applicable codes, standards & statutory regulations,7) Project schedule & network,With all this data plan the detail engineering activities.Basic engineering documents:These mainly cover the following documents:· Plot plan;· Equipment layouts· Pipe rack study sketches;· Study piping layouts;· Piping specification;· Utility distribution diagrams;· Line list & critical line list;Details engineering documents:These mainly covers the following documents:1) Piping layouts drawings;2) Material take off (MTO / BOM) for piping items;3) Nozzle orientation for fabricated equipments;4) Stress analysis;5) Piping isometric drawings;6) Piping support drawings;7) Fire fighting specification8) Drawings for statuary approvals,Other activities:These mainly cover the following documents:1) Review of drawings for machinery & other brought-outs;2) Review of drawings for special piping items;3) Specification for bellows, spring, hangers etc.;4) Specification for insulation & painting of equipments & piping items;5) Updation of P&ID’s based on detailed engineering,6) Scheme for the erection of equipments in consultation with site engineer.Review of process packageReview of P & ID’s:Following information shall be available in P &ID’s:1) Legends, notes, abbreviations2) Line numbers;3) Location of change in piping specification;4) Specific requirements like slope, elevation difference break flanges. Minimum running length, process drains & Vents type of heating (jacketing /steam i electric heating) etc.;5) Proper symbols for piping items;6) Equipments & nozzle numbers;7) All instrumentation & control valves, etc;8) Continuation sheet numbers etc.Review of other documents:1) Utility summary:This document shall reflect the various utilities consumed by each equipments with duty conditions like pressure, temperate, flow, state of fluid, critical data like freezing point etc.2) Conceptual equipment layouts:This document gives the general arrangement of the Equipments considering the process requirements like Inter-distances & approximate elevations of the equipments;3) Piping material specification:Basic material for piping items, valve specifications, special, flanges & gaskets required , any other specific requirement.4) Type of storage required: This document shall mention the state of the fluid & type of equipment to be used for the storage like API Tank, silo, dehumidified atmosphere (warehouse), bullet horizontal / vertical) etc.5) Hazard classification:This documents gives the type of hazard for the fluids being handled ( like class a/b/c, flammability toxicity etc.) & the special precautions to be taken care.6) Future expansion requirements:These are to be mentioned by the client & to be taken care for the space requirement during the layout stage.Plot planPlot plan shows overall areas & locating co-ordinates of:Process unitRaw material storageFinished product storageUtility generation areasPipe racksElectrical receiving and distribution substationFacility blocks e.g. Work shop ,weigh bridge, canteen,Administration lock, security , car/lorry park etc.Flare system,Effluent treatment,Green belt,Future requirements etc.Following document are required to develop the plot plan:Plot boundary and contour surveyAccess road, rail roadIncoming utilities e.g. Electrical, Power, Water,Feed stock etc.Wind directionFacilities around the plot etc.Factors to be kept in mind while developing the plot plan:1. Statutory requirement e.g.factory inspectorchief controller explosivestariff advisory committeepollution boardlocal bodiesaviation authoritieshazardous area classification2.Site contour, drainage, effluent disposal, plant roads, space for pipe rack, underground lines etc.3.Process & clients requirements4.Material movement & workers managementEnsure the following while developing the plot plan:1) Utilities are closed to process plant to cut down the length of pipes & cable racks2) Raw material and finished product warehouse / tank ages are close to access road/rail road3) Utility areas are kept near to each other as utility operators are common.4) Wind direction taken care of while locating chimneys cooling tower etc.5) Effluent disposal is towards natural plot gradient6) Hazardous tank ages are at safe distance from process plant.Equipment layoutEquipment layout must show the following:All equipments including tanks, vessels, process Pumps and other rotating machinery giving three locating Co-ordinates.1) Package items2) Pipe racks3) Electrical & instrument cable trays.4) MCC and control rooms5) A/C ducting6) Offices & maintenance areas7) Building features including columns, beams, walls, floor Openings, staircases, passages etc.8) Show tube removal space for heat exchangers9) Show monorails lifting bays & hoists etc.Consideration must be given to the following whileDeveloping equipment layoutsProcess requirementsOperations & maintenance requirementsHazardous area classificationSafety requirementsFactory inspector’s requirementsTAC requirementsCivil requirementsErection / dismantling requirementsFuture provisionsBasic engineering documentsPipe rack study sketches:These are prepared taking into account requirements of piping, electrical & instrument cable trays to be routed between various plant areas.These documents are used by civil, piping, electrical and instrument group to prepare detailed construction drawings.Study piping layouts:Prepared to show routing of critical process lines which could affect functioning of plant. This document reviewed by process licensor and forms basis of detailed piping layout drawings.Piping specifications:These documents specifies in detail all piping items required for the plant.Various piping items required for a particular duty condition, depending on type of fluid; line pressure & temperature are listed under one specification class.Utility flow diagram (UFD)This document is similar to P&ID’sPrepared based on utility summaryPrepared based on utility summery furnished by process groupShows utility generation and distribution in the plant.Line numbering and line listAll process and utility lined appearing in P&ID’s and UFD’s are given unique serial numbers on these documents the operating, design and test conditions, insulation & painting requirements are listed on line list.Critical line listAll line requiring stress/vibration analysis etc. Are listed in this documentPiping LayoutsDocument required to develop piping layout:1) Equipment layouts2) Process P&ID’s3) Utility P&ID’S4) Line designation list5) Piping specification6) Equipment data sheets /vendor drawings7) Civil drawings8) Inline instrument details9) Insulation requirementsFollowing points shall be kept in mind while developing piping layoutsProcess requirements e.g.Slopes, vents & drains, barometric leg for vacuum linesInstrument requirements e.g.Straight length for flow measurementLocation of control valves, safety valves,PLS, TIS, etc.Safety requirementsOperations & maintenanceAccessibilityService /hose stations, safety showersPiping layouts is required by site for construction to prepare isometrics & into instrument group for hook-ups.Piping layouts must considerProcess requirements operations & maintenance requirements area classificationSafety requirements factory inspector’s requirements TACRequirements civil requirements erection / dismantling requirements future provisions.Stress analysisWhy stress analysis?Stress analysis is carried out for all lines covered in critical line list. This is to ensure flexibility of lines operating at elevated Temperatures and also to ensure that load on equipment Nozzles is within remissible limits due to expansion of piping. Stress sketches are prepared in isometric form on STD stress sheet showing location of all supports.Stress analysis ensures1. Integrity of pipe & piping components against pressure and dead weight.2. Flexibility of pipe from thermal expansion.3. Safety of nozzles to the connected critical equipments4. Proper supporting against dead weight, thermal expansion & occasional loads like & earthquake5. Proper selection and specification of special supports like spring hangers and expansion joints.Stress analysis is carried out forStress critical linesElevated temperature lines80 NB & above > 260 deg c.150 NB & above> 120 deg cJacketted linesEquipment critical linesLines connected to rotating machinery - pump (API 610), turbine (NEMA - SM23) reciprocating compressorFired heater (API 560), air cooler(API 661), reformer vessels with brittle liningsAnalysis to ensure the nozzle loads within stipulated maximumSpecified by codes /equipments vendors.Support critical linesTwo phase flow lines very thick & very thin lines. That is, lines ha ving dia to wall thickness ratio in the range 10 < D/T > 90 relief critical lines. Relief valve discharge lines flare header, liquid blow down lines downstream of bursting disc.How Stress Analysis is carried out?Stress analysis is carried out using software like “CAEPIPE” output data is tabulated on stress sketch. A typical stress sketch giving input and output data is enclosed nozzle loadings on equipments is transmitted to vessel /mechanical group for approval if it exceeds permissible limit.Statutory approvalsVarious statutory bodies:1) Chief inspector of factories2) Chief inspector of boilers3) Chief controller of explosivesA) Petroleum act & rules ( for storage tanks)B) Gas cylinder & static & mobile pressure vessel rules4) Oil industry safety directorate5) Tariff advisory committee6) Pollution control board7) Local bodies ( Municipal / District authority, port authority, Aviation authority, highway authority etc.8) electrical inspection9) town planning authority.Responsibility of piping engineering at siteList of the major activities1) Supervision of fabrication & erection of equipments and piping.2) Co-ordination with clients, contractors, & detail engineering office.3) Planning & monitorin g the work for timely completion of the project.4) Conduct welding procedure & performance qualifications5) Assure the quality of work done by contractors.6) Maintain QA/QC records.7) Assure the lifting equipments tools & tackles are in proper condition.8) Check the alignments of equipments.9) Assure the work is carried out as per P & ID’s, layouts drawings & isometrics.10) Check visual inspection & radiography of weld joints11) Check insulation & painting as per the specificationsResponsibility of piping engineering at site Testing of pipingWitness the hydrostatic / pneumaticTesting of pipelines as per the procedures commissioningMechanical commissioning of rotary equipments and water trial runs of systemsComputer in Piping EngineeringSoftware used in piping design & engineering following is the list of little software available in the market:Autocad I MicrostationPDS / PDMS ( 3D plant design system)Auto plant / Tata -Cape auto flowCaepipe / Ceaser-II / TriflexAdvantages and uses of various software packagesA) Autocad / Micro Station1) Useful for piping application:A) P&ID’sB) Plot plansC) Equipments layoutsD) Piping plansE) IsometricsF) Piping support drawingsAdvantages:A) Replace drawing boardB) Neat drawingsC) Fast modificationsD)Copying of identical parametersPDS / PDMS ( 3D - Plant Design System)Salient featuresA) 3D software input data via forms & menusB) 3D model easy conceptualizing of plant layoutsC) On line clash detectionsD) Various information obtained PDS/PDMS• Piping layouts• Ducting layouts• Cable tray layouts• Isometrics & material take-offE) CustomizationF) Various discipline engineers working in their design modules like civil Engineers on structural & piping engineers on piping module etc.G) Ability to get inputs from various engineering disciplines without fi1ndering their dataH) reporter moduleI) Linking to in- house M to program for procurement & line wise reportJ) Piping specification in users formatSoftware for stress analysisCAEPIPECaeser – IITriflexAdvantages of above software• Time saving, problem which used to consume weeks can be solved within minutes.• Accurate results• Can solve problems with number of anchors and number of piping branches which By manual method is unthinkable Can solve problems consisting of occasional loads and various combination of Loads.Network setupRefer enclosed line diagramGiving network componentConnectivity both for LAN and WAN

Where do I get important points and steps for learning Spring Framework Java?

Spring:It’s an application framework & IOC container used for building any Java project.It’s a light weight framework, which can be easily integrated with other frameworks like Hibernate, Struts, …It supports several modules among them Core,JDBC,MVC,AOP,TX,ORM…Spring comes with many predefined templates(JdbcTemplate,JMSTemplate,HibernateTemplate…).Spring applicaitons are light weight architecture.Spring application’s are loosely coupled, by using a concept of dependency injectionInversion Of Control(IOC):SpringContainer: is responsible for instantiating objects, maintaining a life cycle of object. Access to an object is done by BeanFactory/ApplicationContext/AnnotationConfigApplicationContext is used.bean.getBean(“abc”); Let’s learn the code in plain java terms, without dependency injectionimport org.apache.log4j.Logger; public class DependencyInjection {  static Logger LOG = Logger.getLogger(DependencyInjection.class);  public static void main(String[] args) {  MyApplication myApp = new MyApplication();  myApp.processMessage("[email protected]", "test mail");  } } class MyApplication {  EmailService emailService = new EmailService();  public void processMessage(String sendTo, String message) {  DependencyInjection.LOG.info("from processMessage() of " + this.getClass());  emailService.sendMail(sendTo, message);  } } class EmailService {  public void sendMail(String sendTo, String message) {  DependencyInjection.LOG.info("Mail has been sent to " + sendTo + "\t with message.." + message);  } } Note:here the problem with MyApplication, as EmailService is tightly bound to it. If we want to make any changes in EmailService, then one must have to check how many places it's declared and need to change at all places. Tomorrow if we want to include other services, then one must have to include an application, it also required code changes. with dependency injection.Injecting setterBased or constructorBased is completely based on design, if my application won’t work without service, then we must go constructor injection else setter injection.There are three ways to inject dependencybyName (by name of variable declared in class)byType (by data type, used for declaration of variable)byConstructor(by using datatype defined the variable).Difference between setterInjection and constructorInjectionPartial dependency injection cannot be made by constructorInjection, example we have 3 arguments in constructor, and want to inject only two value, this is possible by setter injectionChange in value in constructor injection leads to the creation of a new object, we as setter will not.If we define both, it uses setter injection first. (i.e. setterInjection overrides constructor injection).public class DependencyInjection{  static final Logger LOG = Logger.getLogger(DependencyInjection.class);  public static void main(String[] args) {  MessagingService service = new EmailService();  Application app = new Application(service);  app.processMessage("test mail", "[email protected]");  service = new SMSService();  app = new Application(service);  app.processMessage("test message", "999999999");  } } class Application{  MessagingService msgService = null;  //constructor based dependency injection  Application(MessagingService msgService){  this.msgService = msgService;  }  //setter based dependency injection  public void setMsgService(MessagingService msgService){  this.msgService = msgService;  }  public void processMessage(String message,String rec){  msgService.send(message, rec);  } } interface MessagingService{  public void send(String message,String rec); } class EmailService implements MessagingService{  @Override  public void send(String message, String rec) {  DependencyInjection.LOG.info("Email sent with message "+message+" to "+rec);  } } class SMSService implements MessagingService{  @Override  public void send(String message, String rec) {  DependencyInjection.LOG.info("SMS sent with message "+message+" to "+rec);  } } Dependency Injection using Spring<dependency>   <groupId>org.springframework</groupId>  <artifactId>spring-context</artifactId>   <version>4.0.0.RELEASE</version>  </dependency> <!--this will include, all major jar files, which are needed for core dependency injection core,context,beans,expression --> beans.xml<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans"  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd">  <bean name="myApp" class="younus.attari.MyApplication">  <!-- <property name="messageService" ref="emailService"></property> -->  <property name="messageService" ref="smsService"></property>  </bean>  <bean name="emailService" class="younus.attari.EmailService">  </bean>  <bean name="smsService" class="younus.attari.SMSService">  </bean> </beans> MainClass.javaimport org.apache.log4j.BasicConfigurator; import org.apache.log4j.Logger; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class MainClass {  private static final Logger LOG = Logger.getLogger(MainClass.class);  public static void main(String[] args) {  loadLog4j();  ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");  MyApplication obj = context.getBean("myApp", MyApplication.class);  LOG.info("inside main method...");  obj.getMessageService().send("Test message", "[email protected]");  }  private static void loadLog4j() {  BasicConfigurator.configure();  } } MessaginServicepublic interface MessageService {  public void send(String message, String recepient); } EmailServiceimport org.apache.log4j.Logger; public class EmailService implements MessageService {  private static final Logger LOG = Logger.getLogger(EmailService.class);  @Override  public void send(String message, String recepient) {  LOG.info("message sent with context "+message+"\t recepient "+recepient);  } } SMSServiceimport org.apache.log4j.Logger; public class SMSService implements MessageService {  private static final Logger LOG = Logger.getLogger(SMSService.class);  @Override  public void send(String message, String recepient) {  LOG.info("message sent with context " + message + "\t recepient " + recepient);  } } outputinside main method... 0 [main] INFO younus.attari.MainClass - inside main method... message sent with context Test message recepient [email protected] 1 [main] INFO younus.attari.SMSService - message sent with context Test message recepient [email protected] Bean Scope: As the instance are created by spring container like BeanFactory or ApplicationContext. The instance will have some scope, the different types of scopes spring supports isSingleton (single object for an entire container)Prototype(new bean is created with every request/reference)request (new bean is created with every servlet request)Session(one bean per servlet session)GlobalSession (new bean per global session)Some important interface in springApplicationContextAware //access to context objectBeanNameAware //tells the name of bean injected. setBeanName() is used for setting the bean name.BeanFactoryAware//gives the access to BeanFactory, using method like setBeanFactory(BeanFactory context)ApplicationContextAware//gives the access to ApplicatoinContext, using method like setApplicationContext(ApplicationContext applicationContext) AbstractApplicationContext //used to call registerShutDownHook(), it will get called when the application ends. Useful if you have destroyed method in the application.IntializaingBean //it tells spring, when the bean is getting intialized.it has method afterPropertySet()DisposableBean// it tells spring, when the been is destroyed.It has method destory()BeanPostProcessor //it tells spring, some process needs to be done, after initializing a bean. It has two method postProcessBeforeInitialization() and postProcessAfterInitialization();BeanFactoryPostProcessor //used well when we want code to be execute before bean instantiation, like setting a values from .properties file to .xml file using PropertyPlaceLoaderHandlerMapping in Spring:HandlerMapping : It is an interface implemented by all objects, that map the request to the corresponding object. DispatcherServlet internally calls BeanNameUrlHandlerMapping & DefaultAnnotationHandlerMappingBeanNameUrlHandlerMapping: It match the url to the bean nameDefaultAnnotationHandlerMapping: It is used to map ‘@RequestMapping , ‘@RequestMapping can be applied on type and method.ControllerBeanNameHandlerMapping: It maps the url to the bean name of the registered bean or annotated beanControllerClassNameHandlerMapping: It maps the url to bean class of the registered bean or annotated bean.RequestMappingHandlerMapping : It maps the request directly to the method.SimpleUrlHandlerMapping: Allows mapping of urlpattern to handlers.It can be formed in two ways1) property key<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">  <property name="mappings">  <props>  <prop key="/welcome.htm">welcomeController</prop>  <prop key="/*/welcome.htm">welcomeController</prop>  <prop key="/helloGuest.htm">helloGuestController</prop>  </props>  </property>  </bean>   <bean id="welcomeController"  class="com.mkyong.common.controller.WelcomeController" />   <bean id="helloGuestController"  class="com.mkyong.common.controller.HelloGuestController" /> 2) value<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">  <property name="mappings">  <value>  /welcome.htm=welcomeController  /*/welcome.htm=welcomeController  /helloGuest.htm=helloGuestController  </value>  </property>  </bean>   <bean id="welcomeController"  class="com.mkyong.common.controller.WelcomeController" />   <bean id="helloGuestController"  class="com.mkyong.common.controller.HelloGuestController" /> ClasspathXMLApplicationContext vs FileSystemXMLApplicationContext?ClasspathXMLApplicationContext (if the xml file is in same path or resources folder)FileSystemXMLApplicatonContext(if the xml file is in different path)Difference between BeanFactory and ApplicationContext?1) Bean factory doesn’t support internalization, where ApplicationContext supports it.2) BeanFactory loads bean lazily until getBean() is call. ApplicationContext loads bean at time of startUp()3) BeanFactory doesn’t publish events, whereas ApplicationContext publishes events to the bean, that are registered as listeners.4) BeanFactory doesn’t support annotation based dependency like ‘@Autowired, ‘@PreDestory, where ApplicationContext support.Spring Bean Life Cycle: Spring allows four ways of controlling a life cycle.1)Using InitialisingBean and DisposableBean2)Using Aware Interface(ApplicationContextAware,BeanNameAware,ApplicationContextEventListenerAware…)3)Using custom init and destroy method4)Using ‘@PostContruct and ‘@PreDestory Annotation(JSR Annotations) .Some Important Annotation:‘@Configuration can be used in replacement of spring.xml file.<bean id="empDetails" class="spring.framework.EmployeeDetails">  <property name="empName" value="Muhammed Younus Attari" />  <property name="empDesig" value="Muhammed Younus Attari" />  <property name="empId" value="123" />  <property name="empSal" value="22" /> </bean>  ApplicationContext context = new ClassPathXmlApplicationContext("spring.xml"); ====================replaced with================================= @Configuration public class AnnotationConfiguration {  @Bean(name = "empDetails")  public EmployeeDetails getEmpDetails() {  EmployeeDetails empDetails = new EmployeeDetails();  empDetails.setEmpName("Muhammed Younus Attari");  empDetails.setEmpId(123);  empDetails.setEmpDesig("Techinal Java Lead");  empDetails.setEmpSal(22222);  return empDetails;  }  @Bean(name = "emp")  public Employee getEmployee() {  return (new Employee());  } }  ApplicationContext context = new AnnotationConfigApplicationContext(AnnotationConfiguration.class); Note: ‘@Bean is used for defining a bean with bean name as empDetails.@’Required is used for validating a field is ready to autowire/bind or not, if it is not available then it will throw an exception at the time of loading a container.‘@Qualifier is used when you define bean’s more than once in spring.xml file, and performing autoWire=’byType’, then to tell spring container which bean to be injected, this annotation is used.ex:@Qualifier(name=’empDetails1′)‘@PropertySource(“classpath:messages.properties”)Used to get messages from properties file.//prog to access resource from properties file  package spring.framework;  import org.springframework.beans.factory.InitializingBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.PropertySource; import org.springframework.core.env.Environment; import org.springframework.stereotype.Service;  @Service @PropertySource("classpath:application.properties") public class ConfigService implements InitializingBean {   @Autowired  private Environment env; //static cannot be autowired   private static Environment environment;   @Autowired  private MessageSource messageSource;   public static String getProperty(String key) {  System.out.println(environment.getProperty(key));  return environment.getProperty(key);  }   @Override  public void afterPropertiesSet() throws Exception {  this.environment = env;   }  //another style of accessing values are...   public void displayMessageFromProperties(){  System.out.println(this.messageSource.getMessage("key",null,"default value",null);  } } JSR-303 Annotations: Spring also supports JSR (Java Specification Request) Annotation. It is used for resource binding, validations, |1)@Resource(name=”some”) same as ‘@Autowired in spring.2)@PreDestory → same as destory() of DisbosableBean3)@Postcontruct → same as afterPropertiesSet() of IntializingBean4)@NotNull(message=”employee name cannot be null”)5)@NotBlank(message=”employee name cannot be blank”)@’NotEmpty(message=”cannot be empty”)Difference between NotNull, NotEmpty, NotBlankString name = null; @NotNull: false @NotEmpty: false @NotBlank: false  String name = ""; @NotNull: true @NotEmpty: false @NotBlank: false String name = " "; @NotNull: true @NotEmpty: true @NotBlank: false  String name = "Great answer!"; @NotNull: true @NotEmpty: true @NotBlank: true 6)@Pattern(regexp=”[a-z-A-Z]”)7)@Max( value=18, message=”Age should be greater/equal to 18)8)@Min(value=60, message=”After 60 retirement starts”)9)@Size(min=8 , max=15, message=’entered password should be in 8 to 15 )10)@Past(message=’entered date should be the past date)11)@Feautre(message=’entered date should be feature date)12)@Valid we can apply on single value/collections, if applied on collections all values in collection will be checked, except null values are ignored.StereoTypes in spring?It add level of documentation, by reading the annotation we get Idea, what it does.It tells Spring containter the roles of each class@Component@Controller@Repository@Service are the stereotypes of spring frameworkUserDefined Event handling in spring frameworkTestCase: Consider we want a specific method like send() to be called, we want to publish a message using event handling mechanism.1)extends ApplicationEventimport org.springframework.context.ApplicationEvent; import org.springframework.stereotype.Component; @Component public class MessagingEvent extends ApplicationEvent {  public MessagingEvent(Object source) {  super(source);  }  @Override  public String toString() {  return "Send Message Event call";  } } 2)implements ApplicationEventPublisherAware @Override  public void setApplicationEventPublisher(ApplicationEventPublisher applicationEventPublisher) {  this.publish = applicationEventPublisher;  }    public void send() {  LOG.info("message sent with context " + msgContent.getMessage() + "\t recepient " + msgContent.getRecepients());  MessagingEvent msgEvent = new MessagingEvent(this);  publish.publishEvent(msgEvent);  } Spring JDBCTemplate: Spring allows to connect to database by providing a call JdbcTemplate. JdbcTemplate is used for connecting different types of databaseSome important methods in spring1) void execute(“sql”) → used for executing DDL commands2)T execute(“sql”,PreparedStatementCallBack)→ allows to execute with parameters3)int update(“sql”) → used for executing DML commands4)query(“sql”, ResultSetExtractor) → used for fetching records using resultextractor5)query(“sql”,RowMapper)→used for fetching records using rowmapper6)int update(“sql”, new PrepareStatementSetter({void setValues(PreparedStatement ps){ps.setxxx(“”,””); }}););7)queryForList(sql) →Return list of objects8)queryForMap(sql)→Returns map of objects9)queryForObject(sql)→Returns objects10)queryForObject(sql,[argument], rowmapper);@Override  public List<MessageContent> getMessagesList(int number) {  String sql = "select messageId,messageName,messageSource,message,recepients From message where messageId < ?";  return jdbcTemplate.query(sql, new Object[] { number }, new MessageContentMapper());  } MapperClassimport java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List;  import org.springframework.jdbc.core.RowCallbackHandler; import org.springframework.jdbc.core.RowMapper;  public class MessageContentMapper implements RowMapper<MessageContent> {   @Override  public MessageContent mapRow(ResultSet rs, int arg1) throws SQLException {   MessageContent msgContent = new MessageContent();  msgContent.setMessageId(rs.getString("messageId"));  msgContent.setMessageName(rs.getString("messageName"));  msgContent.setMessageSource(rs.getString("messageSource"));  msgContent.setMessage(rs.getString("message"));  msgContent.setRecepients(rs.getString("recepients"));  return msgContent;   }  } Note: RowMapper saves a lot of code because it internally adds the data of ResultSet into the collection.Way to execute batch update, using jdbcTemplate jdbcTemplate.batchUpdate(BatchPreparedStatementSetter) public void executeBatchUpdate(){  String sql="insert ....";  jdbcTemplate.batchUpdate(sql,new BatchPreparedStatementSetter() {  @Override  public void setValues(PreparedStatement ps, int i) throws SQLException {  ps.setXXx..i.  }  @Override  public int getBatchSize() {  return 0;  }  });  } Way to execute PLSQL(Stored procedure) using jdbcTemplate.call(CallableStatementCreator);public void executePLSQL(){  String sql="{call sp_test(?,?,?,?)}";  List paramList = new ArrayList();  paramList.add(new SqlParameter(Types.VARCHAR));  paramList.add(new SqlParameter(Types.VARCHAR));  paramList.add(new SqlParameter(Types.VARCHAR));  paramList.add(new SqlOutParameter("msg", Types.VARCHAR));  jdbcTemplate.call(new CallableStatementCreator() {  @Override  public CallableStatement createCallableStatement(Connection con) throws SQLException {  CallableStatement cst= con.prepareCall(sql)l  cst.setXX  cst.registerOutParameter(3, Types.VARCHAR);  return cst;  }  }, pramList);  } Spring NamedParameterJdbcTemplate:Spring provides anotherway to insert data, instead of using (placeholder) ? → name with colon can be used. Helps in remembering data for the column.In this we need to make use to map, for mapping the values.example: String sql = "insert into dummy_state values(:id,:name,:abbrevation)";  Map<String, String> map = new HashMap<String, String>();  map.put("id", "1");  map.put("name", "Muhammed Younus Attari");  map.put("abbrevation", "Technical Manager");  int i = namedJdbcTemplate.update(sql, map);  String result = (i == 1) ? "Record inserted successfully" : "Please try again";  System.out.println("result...." + result); Spring SimpleJdbcTemplate:It allows arbitrary number of parameter, just like java5 has varargs feature.@Autowired SimpleJdbcTemplate simpleJdbcTemplate;  String sql="insert into employee values(?,?,?)); simpleJdbcTemplate.update(sql,"one","two","three")); Spring HibernateTemplate: Spring provides a magical way of integration with hibernate, by providing HibernateTemplate.HibernateTemplate reduces lot of boiler/plumbing code which we used to write for executing an hibernate application.//Pure Hibernate style  Session session =  new Configuration().configure("hibernate.cfg.xml").buildSessionFactory().getCurrentSession(); session.save(emp);  //HibernateTemplate style hibernateTemplate.save(emp); In order to implement hibernateTemplate(i.e spring +hibernate ) follow below steps.1)web.xml(include hibernate-applicationContext.xml)2)hibernate-applicationContext.xml(below image)BasicDataSource→LocalSessionFactoryBean→HibernateTemplateWays to execute Query in hibernate…1)Query query = session.createQuery(“From table” );2)Query query = session.createSQLQuery(“select *From table”);3)Criteria criteria = session.createCriteria(Employee.class);Commonly used methods:1)hibernateTemplate.saveOrUpdate(p);2)query.list();3)query.uniqueResult();Muhammed Younus Attari's answer to Important points on Hibernate?Spring DAO support classes for jdbc relatedJdbcDAOSupportNamedParameterJdbcDAOSupportSimpleJdbcDAOSupportHibernateTemplateDAOSupportusing above support DAO support classes, we don’t have to write their corresponding boilerplate, autowired class.@Autowired JdbcTemplate jdbcTemplate   //can be replaced with  getJdbcTemplate().  Spring Transaction Management: Transaction is a sequence of operations performed, it can be described in ACID forms.1) Atomicity: Transaction should be treated as a single unit of operation, either the transaction performed will be successful or unsuccessful.2) Consistency: Consistency is nothing but referential integrity of database, i.e unique key, primary key, etc.3) Isolation: There may be many number of transactions are performed at the same time with the same data-set, there should be a way to isolate a request, so that it avoid data corruption.4) Durability: Once the transaction is successful, and system goes down, there it should not effect database. The result of the transaction cannot be erased from database.Note: RDBMS(relational database management supports) supports all above 4 (ACID) properties for each transaction.Transactions in spring can be managed in two types1) Programmatic Transaction management(PTM)2)Declarative Transaction management(DTM)Programmatic Transaction management is the managed through program, this is difficult to implement, but gives extreme flexibility.It’s a good idea to select PTM, if you have less number of transactions or small business.There are different ways to manage programatic tm.1)Using plain try and catch2)Using TransactionalTemplateExample:@Autowired PlatformTransactionManager transactionManager;  public void programaticTransaction() {  String sql = "insert into dummy_state values(?,?,?)";  TransactionStatus status = transactionManager.getTransaction(new DefaultTransactionDefinition());  int i = 0;  try {  i = jdbcTemplate.update(sql, new PreparedStatementSetter() {  @Override  public void setValues(PreparedStatement ps) throws SQLException {  ps.setString(1, "one");  ps.setString(2, "HP");  ps.setString(3, "Himachal Pradesh +++++++++++");  }  });  transactionManager.commit(status);  System.out.println("if value is 1, it means inserted successfully...." + i);  } catch (DataAccessException e) {  // TODO Auto-generated catch block  e.printStackTrace();  transactionManager.rollback(status);  }  System.out.println(".......$$$$....." + transactionManager);  } 2)Using TransactionalTemplate with DataSourceTransactionManagerpublic Person getPersonByRegId(final String regid) throws DAOException {  DataSourceTransactionManager tm = new DataSourceTransactionManager(getDataSource());  tm.setNestedTransactionAllowed(true);  TransactionTemplate transactionTemplate = new TransactionTemplate(tm);  transactionTemplate.setIsolationLevel(TransactionDefinition.ISOLATION_DEFAULT);  transactionTemplate.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRED);   try {  Person person = (Person) transactionTemplate.execute(new TransactionCallback() {  public Object doInTransaction(TransactionStatus status) {  try {  return (Person) selectPersonByRegid.findObject(regid);  } catch (Exception e) {  status.setRollbackOnly();  throw new RuntimeException(e);  }  }  });  return person;  } catch (DataAccessException e) {  throw DAOException.wrapStandordException("lookup failed[" + regid + "]",  new DAOException(e));  } catch (Exception e) {  throw DAOException.wrapOtherException("lookup failed[" + regid + "]", e);  }   } TransactionTemplate: Adopts same approach as other templates; like JdbcTemplate. It uses TransactionCallback interface, which has abstract method doInTracation(TransactionStatus status);TransactionSettings such as propagation mode, isolation level, timeout etc, will be set on TransactionTemplate either inside program or configuration file.TransactionDefinition: is the core interface in transaction support in springCode within the callback can roll the transaction back by calling the setRollbackOnly() method on the supplied TransactionStatus object.Declarative Transaction management is managed through pre-defined code using Annotation (‘@Transactional).If your application has numerous transactions, then DTM is worth while. It keeps transactional management out of business logic, and it’s not difficult to configure.Implementation of Declarative Transaction Management.1)Changes need to made in spring-configuration file.<tx:annotation-driven proxy-target-class="true"  transaction-manager="transactionManager" />  <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">  <property name="dataSource" ref="dataSource" /> </bean>  <bean id="dataSource"  class="org.springframework.jdbc.datasource.DriverManagerDataSource"> ...... Note:Selecting a proper transaction manager is very important, it’s good to be DataSourceTransactionManager under-hock with DriverManagerDataSource.Example:Service:  @Transactional public void insertEmployeeDetails(Employee emp){  employeeDAOImpl.insertEmployeeDetails(emp); //  employeeDAOImpl.insertEmployeeDetailsInManager(emp);   }   DAOImpl: public void insertEmployeeDetails(Employee emp){   String sql="insert into employee values(?,?,?)";  int i = jdbcTemplate.update(sql,new PreparedStatementSetters(){  String result="";  @Override  public void setValues(PreparedStatement ps){  ps.setInt(emp.getId());  ps.setString(emp.getName());  ps.setString(emp.getDesignation());  } });   result = (i == 1) ? "Record inserted successfully" : "Please try again";  System.out.println(result);   }  public void insertEmployeeDetailsInManager(Employee emp){  jdbcTemplate.update("insert into manager values(?,?)",new Object[]{"---------------------", emp.getName())); }  Consider in  insertEmployeeDetails got executed successfully, but in  insertEmployeeDetailsInManager there is an exception occured, NumberFormatException.  in this case Transactional will come into picture, by using that concept it shows first method got executed successfully, but once exception occurred then it will rollback the first method. Spring Security: It provide a mechanism for performing authentication and authorisation on Web application.steps to remember1)Download spring-security-web.jar & spring-security-config.jar2)add context-listener, filter, security.xml in web.xmlMuhammed Younus Attari's answer to How can I implement Spring Security in simple words?Spring Messaging Service:Spring MVC (Model-View-Controller= we are strong when we are connected).This can be implemented in two ways1)Spring Web MVC2)Spring Boot MVCSpring Web MVC: In this we need to configure1)libraries(jar’s)2)web.xml3)spirng-dispatcher.xml4)Controller, Service, DAO & Impl’sSpring Configuration file/dispatcher-servlet.xml:It’s a heart of the spring application, where the object creation takes place.Beans for the presentation layer should be in -servlet.xml, and beans for business logic/dao layer should be in -applicationContext.xml, its not a strict rule, but it’s a good practise.custom style of defining a spring-conf file.<servlet> <servlet-name>dispatcher</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>  <init-param>  <param-name>contextConfigLocation</param-name>  <param-value>/WEB-INF/spring/servlet-context.xml</param-value>  </init-param> </servlet> <servlet-mapping>  <servlet-name>dispatcher</servlet-name>  <url-pattern>/*</url-pattern> </servlet-mapping>   <listener>  <listener-class>org.springframework.web.servlet.ContextLoadListener</listener-class> </listener> note:1)contextConfigLocation is a parameter in Framework servlet(parent class of dispatcherservlet), inorder to override location we need to use a parameter in above way2)listener →ContextLoadListener is defined to boot spring application, if it is not defined then it will be auto-define by dispatcherServlet. The use is to create WebApplicatoinContext →ApplicatoinContext.When you want to put your dispatcher-servlet.xml or any xml file with custom name, and location, then we should use ContextLoadListener.Annotation’s most commonly used in SpringMVC1)@Controller : marks a class as a controller class2)@ResponseBody3)@RestController = ‘@Controller +’@ResponseBody4)@RequestMapping5)@RequestParam: allows to read parameter value from url.http://localhost:8080/spring-example-mvc/one/company?name=one  @RequestMapping(value="/one/{company}")  @Override  public List<Employee> firstRequest(@RequestParam String name,@PathVariable String company){  LOG.info("this is from firstRequest()..."); } } 6)@Service : Marks the class as a service class.7)@Repository: Enables class as a DAO class.8)@Component : Enables a class for auto-detection scanning9)@Autowired10)@Required11)@Transaction is used to add transaction management in spring.12)@ModelAttribute on a method argument indicates the argument should be retrieved from the model. If not present in the model, the argument should be instantiated first and then added to the model. Once present in the model, the argument's fields should be populated from all request parameters that have matching names. This is known as data binding in Spring MVC, a very useful mechanism that saves you from having to parse each form field individually.13)@SessionAttribute : it is used to set the values to the session, it’s easy way implemented in spring, but the other side one must carefully place a value in session, because values are in session will be stored in server for specific amount of time, which causes performance issue due to memory.14)@PathVariable15)@Scope(“request”)Exception Handling in Spring?Consider you have a scenario, where you want to throw exception from DAO.==>try{DAO}catch()→try{Service}catch()→try{controller}catch().It’s very lengthy code, here spring comes into picture. It allows to declare a BaseController, which act as a BaseExceptionHandler.@ControllerAdvice public class BaseController{  @ExceptionHandler(value=IdNotFoundException.class) @ResponseBody @ReturnStatus(HttpStatu.BAD_REQUEST) public String handleInvalidIdException(InvalidIdException e){ return e.getTrace(); } } 1)ResponseEntity & HttpStatus code2)@ResponseStatus on custom exception class3)Custom method to handle error on controller(‘@ExceptionHandlar,@ResponseStatus)4)Using error representation, instead of default error page(html)ResponseEntity & HttpStatus code:if(exception occurs) return new ResponseEnity("custom message",HttpStatus.NOT_FOUND); else return new ResponseEntity(cutomer, HttpStatus.OK); Using ‘@ResponseStatus on custom exception class.@ResponseStatus(value=HttpStatus.NOT_OK, reason="corrupt data") public class RuntimeBaseException extends RuntimeException {   /**  * Generated UID  */  private static final long serialVersionUID = -3868232127218537194L;   protected String errorCode;   protected Object[] messageParams;    public RuntimeBaseException() {  super();  }   public RuntimeBaseException(String msg) {  super(msg);  }   public RuntimeBaseException(String msg, String errorCode) {  super(msg);  this.errorCode = errorCode;   }   public RuntimeBaseException(Throwable e) {  super(e);  }   public RuntimeBaseException(String msg, Throwable e) {  super(msg, e);  this.errorCode = e.getMessage();  }   public static String getStack(Throwable e) {  StackTraceElement[] st = Thread.currentThread().getStackTrace();  return st[4].getClassName() + "." + st[4].getMethodName() + "():" + st[4].getLineNumber() + " ->"  + e.getMessage();  }   public static String getStack() {  StackTraceElement[] st = Thread.currentThread().getStackTrace();  return st[4].getClassName() + "." + st[4].getMethodName() + "():" + st[4].getLineNumber() + " -> ";  }   public String getErrorCode() {  return this.errorCode;  }   /**  * @return Returns the messageParams.  */  public Object[] getMessageParams() {  return messageParams;  } } Using custom method to handle, by adding ‘@ExceptionHandler(CustomException.class)@ResponseStatus(value=HttpStatus.NOT_FOUND,reason="customId not found")  @ExceptionHandler(CustomException.class) public void readDataById(){  } Difference between Interceptor and Filter in Spring?Interceptor has more control over Filter, because it has a properties like before request, after request, and after properties set. Where as filter runs between the request. it works only at the time of receiving a request.Interceptor in spring can be implemented by implementing interface HandlerInterceptor.org.springframework.web.servlet.HandlerInterceptor preHandle(), postHandle() and afterCompletion() A filter in spring can be implemented by implementing javax.servlet.Filter interface.init(), doFilter(),destroy()methods:Spring Interceptor→preHandle,postHandle,afterPropertiesSet, inorder to avoid this, we have HandlerInterceptorAdapter this will not force to implement all methods.<bean id="maintenanceInterceptor"  class="younus.attari.common.interceptor.MaintenanceInterceptor">    </bean> Spring Filter→OneRequestMapping→doInternalFilter();<filter> <filter-name>Filter</filter-name> <filter-class>younus.attari.CommonFilter</filter-class> </filter> <filter-mapping> <filter-name>Filter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> Servlet Filter→init(), destroy() & doFilter().How do you handle Exceptions in SpringFramework?This can be by implement by adding SimpleMappingExceptionResolver in spring-configuration file.<bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver">  <property name="exceptionMappings">  <props>  <prop key="com.howtodoinjava.demo.exception.AuthException">  error/authExceptionView  </prop>  </props>  </property>  <property name="defaultErrorView" value="error/genericView"/> </bean> Spring Boot:In Order to work on SpringBoot, we need to follow 5 important steps.SpringBoot Starter Parent (dependencies)It inherits SpringBoot Dependencies, SpringBoot Dependencies hold all the dependencies required for spring-boot project. We can override a dependency version by specifying a new property in pom.xmlSpringBoot starter web(dependencies)It provides all dependencies needed to develop web/rest application.Spring core,bean,context,aop,MVC.Hibernate validator, validation api.Jackson for JSON binding.Embedded Servlet container(Tomcat).java version 8Spring boot plugin(below <plugin> is added in pom.xml)Spring boot application launcher.(please look at mainclass)create a quick-start maven project.add all dependencies and plugins in pom.xml.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>first.springboot.project</groupId>  <artifactId>springboot</artifactId>  <version>0.0.1-SNAPSHOT</version>  <packaging>jar</packaging>  <name>springboot</name>  <url>http://maven.apache.org</url>  <properties>  <java.version>1.8</java.version>  <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>  </properties>  <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>junit</groupId>  <artifactId>junit</artifactId>  <version>3.8.1</version>  <scope>test</scope>  </dependency>  </dependencies>  <build>  <plugins>  <plugin>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-maven-plugin</artifactId>  </plugin>  </plugins>  </build> </project> FirstSpringBootMainClass.javapackage first.springboot.project.springboot;  import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.ComponentScan;  @SpringBootApplication @ComponentScan("first.springboot.project") public class FirstSpringBootMainClass {  public static void main(String[] args) {  ApplicationContext context = SpringApplication.run(FirstSpringBootMainClass.class);  } } In short spring boot is nothing but it’s a spring framework + embeded tomcat server - xml and some @Annotation.Spring boot starters Someother starters available arespring-boot-starter-jdbc (It supports basic jdbc + jdbctemplate)spring-boot-starter-jpa(It supports jpa)spring-boot-starter-webservice(It supports SOAP webservices)spring-boot-starter-test(Junit + Mockito)Spring Boot MVC: In this we need to configure1)Standalone class(Spring boot application launch)2)pom.xml + SpringApplicationMain.java + Controller.javahttps://github.com/muhammedyounusattari/SpringBoot00.git Spring Boot Logging mechanism:1)Add application.properties filelogging.level.org.springframework.web = DEBUG logging.level=INFO logging.level=ERROR  #pattern style logging.pattern.console= "%d{yyyy-MM-dd HH:mm:ss} - %msg%n" loggin.patter.file = "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"  #storing logs in specific file logging.level.file = application.log Steps to deploy spring-boot to another tomcat/weblogic1) add<java-version>1.8</java-version> <start-class>younus.attari.SpringApplicationTest</start-class> 2)In SpringApplicationTest.java (ApplicationLauncher, one which has main())public class SpringApplicationTest implements SpringBootServletIntializer{    @Override  protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {  return application.sources(SpringApplicationTest.class);  }   public static void main(String arg[]){  SpringApplication.run(SpringApplicationTest.class); }  } Note: if you see jsp code in your application, then make sure you add <dependency>  <groupId>org.apache.tomcat.embed</groupId>  <artifactId>tomcat-embed-jasper</artifactId>  <scope>provided</scope>  </dependency> How to deploy spring-boot in other tomcat server.give a result as war file from pom.xml deploy the war in webapps of another server.  ====================if you want to use jetty server===========<dependencies>  <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-web</artifactId>  <exclusions>  <exclusion>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-tomcat</artifactId>  </exclusion>  </exclusions>  </dependency>  <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-jetty</artifactId>  </dependency>  <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-test</artifactId>  <scope>test</scope>  </dependency>  </dependencies> ====If you want to deploy your application on application server like Jboss====Just change pom.xml<parent>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-parent</artifactId>  <version>1.2.7.RELEASE</version>  </parent>  <dependencies>  <dependency>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-web</artifactId>  <exclusions>  <exclusion>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-starter-tomcat</artifactId>  </exclusion>  </exclusions>  </dependency>  <dependency>  <groupId>javax.servlet</groupId>  <artifactId>servlet-api</artifactId>  <version>2.5</version>  <scope>provided</scope>  </dependency>  </dependencies>  <build>  <finalName>SpringBootBasic</finalName>  <plugins>  <plugin>  <groupId>org.springframework.boot</groupId>  <artifactId>spring-boot-maven-plugin</artifactId>  </plugin>  </plugins>  </build> </project> and make sure, your SpringApplicationExample.java extends SpringBootServletIntializerpackage younus.attari; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.context.web.SpringBootServletInitializer; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.ComponentScan; @SpringBootApplication @ComponentScan("younus.attari") @EnableAutoConfiguration public class SpringApplicationExample extends SpringBootServletInitializer {  public static void main(String[] args) {  SpringApplication.run(applicationClass, args);  }  @Override  protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {  return application.sources(applicationClass);  }  private static Class<SpringApplicationExample> applicationClass = SpringApplicationExample.class; } Spring Advance Concepts:1) SPRING BOOTDifference between Spring and Spring Boot.If we want to develop a web application using spring, then we need to develop from scratch like (web.xml, dispatcher-servlet.xml, controller, jsp, etc), were as when we go with spring boot it itself comes with basic setup of web application.Spring helps in reducing boilerplate or plumbing code via Spring JDBC, JMS, AOP, ORM, MVC, etc on the top of this, when we go with spring boot we don’t even have to go for classes of all these, we just need to configure these details in application.properties.Spring MVC needs a lot of dependencies to work(spring-mvc.jar, logging.jar, core-jackson.jar, etc), when it comes to spring-boot all these core jar’s are already defined in parent pom.xml, which will get inherited when it get needed this reached by including “spring-boot-starter-web.jar” init.Spring-mvc needs lot for configuration like (view resolver, jdbc-template, data-source, etc) where as spring-boot allows auto configuration just by adding these tags in application.properties.the main idea across spring boot is, in today's micro-service world we don’t have to spend much time in configuring stuff like developing web application, which can be handled easily by using spring-boot.2) SPRING MICROSERVICES3) SPRING CLOUD4) SPRING JPA5) SPRING DATA6) SPRING MESSAGINGCode to access resources using system path@Value("http://file://#{systemProperties['user.hom']}/Desktop/uploads") private Resources uploadDocument; 

Feedbacks from Our Clients

I like the ease of using this before the update!

Justin Miller