` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING • SpringSource was the company created by the founders of the Spring Framework. • SpringSource merged with Covalent in January 29, 2008. • SpringSource was purchased for $420m by VMware in August 2009. • Spring’s dominance over the past four years increase as they monopolize the web framework market. Spring Framework in Market
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Below are the number for job postings for Spring Framework professionals on various job portals as on 18th May 2017 Spring Framework Job Trends Job Trend In India Job Trend In USA
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING The job posting trend of jobs advertised citing Spring as a proportion of all permanent or contract IT jobs with a match in the Libraries, Frameworks & Software Standards category Spring Framework Job Trends
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que1 : What is a Spring Framework?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que1 : What is a Spring Framework? • It is a lightweight, loosely coupled and integrated framework created to address the complexity of enterprise application development • Because of its layered architecture, we can be selective about which of its components to use while also providing a cohesive framework for J2EE application development.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que2 : List the advantages of Spring Framework?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions Que2 : List the advantages of Spring Framework? • Layered architecture • Enables POJO Programming • Dependency Injection and Inversion of Control • Open source and no vendor lock-in
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que3 : What are the features of Spring framework ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General 1. Light weight 2. Inversion of Control(IoC) 3. Aspect Oriented(AOP) 4. Container 5. MVC Framework 6. Transaction Management 7. JDBC Exception Handling Que3 : What are the features of Spring framework ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que4 : How many modules are there in Spring and What are they?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que4 : How many modules are there in Spring and What are they?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que5 : What is Spring configuration file?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que5 : What is Spring configuration file? • Spring configuration file is an XML file which • Contains the classes information • Describes how classes are configured and introduced to each other
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que6 : What are the different components of Spring application?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General 1. An interface that defines the functions. 2. The implementation that contains properties, its setter and getter methods, functions etc., 3. Spring AOP 4. The Spring configuration XML file 5. Client program that uses the function Que6 : What are the different components of Spring application?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que7 : What are the major features in different versions of Spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que7 : What are the major features in different versions of Spring? • Spring 2.5: made annotation driven configuration possible • Spring 3.0: made great use of java 5 improvements in the language • Spring 4.0: 1st version to fully support java features
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que8 : What are the various ways of using spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-General Que8 : What are the various ways of using spring? 1. Full-fledged Spring web app 2. Spring middle-tier provides help of a third-party web framework 3. Remote usage scenario 4. EJB -- Wrapping existing POJOs
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que1 : What is Spring IOC container?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que1 : What is Spring IOC container? The Spring IOC : • Creates the objects • Wire them together • Configure them • Manage their complete lifecycle from creation till destruction • Uses dependency injection (DI) to manage the components that make up an application.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que2 : What do you mean Dependency Injection?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC • We don’t create objects but describe how they should be created • We don't directly connect components and services together in code but describe which services are needed by which components in a configuration file • A container (the IOC container) is then responsible for hooking it all up. Que2 : What do you mean Dependency Injection?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que3 : In how many ways Dependency Injection can be done?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que3 : In how many ways Dependency Injection can be done? There are three types of dependency injection: 1. Constructor Injection : Dependencies are provided as constructor parameters 2. Setter Injection : Dependencies are assigned through JavaBeans properties (ex: setter methods) 3. Interface Injection: Injection is done through an interface But only Constructor Injection and Setter Injection are supported in Spring.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que4 : Differentiate between constructor injection and setter injection?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Constructor Injection Setter Injection 1. There is no Partial Injection 1. There can be Partial Injection 2. It doesn’t overrides the setter property 2. It overrides the constructor property if both are defined 3. It will create new instance if any modification is done 3. It won’t create new instance if modification is done 4. It is better for too many properties 4. It is better for few properties Que4 : Differentiate between constructor injection and setter injection?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que5 : How many types of IOC containers are there in spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC ApplicationContext IoC A BeanFactory is like a factory class that contains a collection of beans. It instantiates the bean whenever asked for by clients. The ApplicationContext interface is built on top of the BeanFactory interface. It adds some extra functionality than BeanFactory Que5 : How many types of IOC containers are there in spring? Bean Factory
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que6 : Differentiate between BeanFactory and ApplicationContext.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Bean Factory Application Context 1. Uses Lazy initialization 1. Uses Eager/Aggressive initialization 2. Explicitly provided a resource object using the syntax 2. Creates and manages resources objects on its own 3. Doesn’t supports internationalization 3. Supports internationalization 4. Annotation based dependency Injection is not supported 4. Annotation based dependency Injection is supported Que6 : Differentiate between BeanFactory and ApplicationContext .
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC Que7 : List some of the benefits of IoC?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-DI/IoC • It minimizes the amount of code in application. • Makes application easy to test • Loose coupling is promoted with minimal effort and least intrusive mechanism • IOC containers support eager instantiation and lazy loading of services. Que7 : List some of the benefits of IoC?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans Que1 : Explain Spring beans?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans • The objects that form the backbone of the users application • It is an object that is instantiated, assembled, and managed by IoC container • They are created with the configuration metadata IoC ContainerMetaData Beans Que1 : Explain Spring beans?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que2 : How configuration metadata is provided to the Spring Container? Spring Interview Questions-Beans
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans Configuration Metadata XML based configuration file Annotation-based configuration Java-based configuration Que2 : How configuration metadata is provided to the Spring Container?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que3 : How many bean scopes are supported by the Spring ? Spring Interview Questions-Beans
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans Singleton Single instance per Spring IoC container Prototype Single bean definition to have any number of object instances Request HTTP request. (only valid in the context of a web-aware Spring ApplicationContext) Session HTTP session. (only valid in the context of a web-aware Spring ApplicationContext) Global-session Global HTTP session.(only valid in the context of a web-aware Spring ApplicationContext) Que3 : How many bean scopes are supported by the Spring ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que4 : What is the Bean life cycle in Spring Bean Factory Container ? Spring Interview Questions-Beans
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans Que4 : What is the Bean life cycle in Spring Bean Factory Container ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que5 : Explain inner beans in Spring? Spring Interview Questions-Beans
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans public class Student { private Person person; //Setters and Getters } public class Person { private String name; private String address; //Setters and Getters } <bean id=“StudentBean" class="com.edureka.Student"> <property name="person"> <!-- This is inner bean --> <bean class="com.edureka.Person"> <property name="name" value=“Scott"></property> <property name="address" value=“Bangalore"></property> </bean> </property> </bean> • When a bean is only used as a property of another bean it becomes an inner bean • Inner beans are anonymous and are scoped as prototypes. Student.class Reference of Person.class Que5 : Explain inner beans in Spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que6 : Define bean wiring? Spring Interview Questions-Beans
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans • Wiring means Beans are combined together within the Spring container • While wiring beans, the Spring container needs to know what beans are required and how the container should use dependency injection to tie them together. Spring Container Spring Beans Que6 : Define bean wiring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans Que7 : What do you understand by auto wiring and name the different modes of it.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans The Spring container is able to autowire relationships between collaborating beans that automatically Spring resolves collaborators (other beans) for our bean by inspecting the contents of the BeanFactory. Que7 : What do you understand by auto wiring and name the different modes of it. Different modes are : byNo byName byType constructor autodetect
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que8 : What are the limitations with auto wiring? Spring Interview Questions-Beans
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Beans Overriding possibility Primitive data types Confusing nature Que8 : What are the limitations with auto wiring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations Que1: What do you mean by Annotation-based container configuration?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations • Instead of using XML to describe a bean wiring, the developer moves the configuration into the component class itself by using annotations on the relevant class, method, or field declaration. • It acts as an alternative to XML setups. @Configuration public class AnnotationConfig { @Bean public MyDemo myDemo() { return new MyDemoImpll(); } } Que1: What do you mean by Annotation-based container configuration?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations Que2 : How annotation wiring is turned on?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" <context:annotation-config /> <beans ………… /> ……………………… </bean> </beans> By default, Annotation wiring is not turned on in the Spring container thus to use annotation based wiring we must enable it in our Spring configuration file by configuring <context:annotation-config/> element. Que2 : How annotation wiring is turned on?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Que3 : What’s the difference between @Component, @Controller, @Repository & @Service annotations in Spring? Spring Interview Questions-Annotations
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations @Component @Repository@Service@Controller Presentation PersistenceService Generic stereotype and can be used across application Used to annotate classes at presentation layers level like in Spring MVC. Used to annotate classes at service layer level Used to annotate classes at persistence layer that acs as database repository. Que3 : What’s the difference between @Component, @Controller, @Repository & @Service annotations in Spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations Que4 : What do you understand by @Required annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations • The @Required annotation is applied to bean property setter methods • This indicates that at the configuration time affected bean property should be populated in XML configuration file. • Otherwise, the container will throw a BeanInitializationException exception. public class Employee { private String name; @Required public void setName(String name) { this.name=name; } public string getName() { return name; } } Que4 : What do you understand by @Required annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations Que5 : What do you understand by @Autowired annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations The @Autowired annotation provides more accurate control over where and how autowiring should be done. The @Autowired annotation is used to autowire bean on the setter methods, constructor, a property or methods with arbitrary names and/or multiple arguments. public class Employee { private String name; @Autowired public void setName(String name) { this.name=name; } public string getName() { return name; } } Que5 : What do you understand by @Autowired annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations Que6 : What do you understand by @Qualifier annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations • In situations like , when you create more than one bean of the same type and want to wire only one of them with a property you can use the @Qualifier annotation along with @Autowired to remove the ambiguity by specifying which exact bean should be wired. public class EmpAccount { private Employee emp; @Autowired @Qualifier(emp1) public void showName() { System.out.println(“Employee name : ”+emp.getName); } } public class Employee { private String name; @Autowired public void setName(String name) { this.name=name; } public string getName() { return name; } } Que6 : What do you understand by @Qualifier annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations Que7 : What do you understand by @RequestMapping annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Annotations • @RequestMapping annotation is used for mapping a particular HTTP request method to a specific class/method in controller that will be handling the respective request. • @RequestMapping annotation can be applied at both levels : o Class level : maps the URL of the request o Method level: maps the URL as well as HTTP request method @RequestMapping(method=RequestMethod.GET) public String welcome() { return “Welcome to Edureka”; } Que7 : What do you understand by @RequestMapping annotation ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Bean Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Que1 : Describe Spring DAO support ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access • Provides a set of abstract DAO classes which can be extended. • Aimed at making it easy to work with data access technologies like Hibernate, JDBC or JDO in a consistent way. • We can easily switch between the persistence technologies • Code without worrying about catching exceptions that are specific to each technology Que1 : Describe Spring DAO support ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Que2 : Name the exceptions thrown by the Spring DAO classes ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access DataAccessException InvalidDataAccessResourceUsageException InvalidDataAccessApiUsageException CleanUpFailureDataAccessException DataAccessResourceFailureException DeadLockLoserDataAccessException OptimisticLockingFailureExceptionDataRetrievalFailureException UncategorizedDataAccessException DataIntegrityViolationException TypeMismatchDataAccessException IncorrectUpdateSemanticsDataAccessException ObjectOptimisticLockingFailureException ObjectRetrievalFailureException Spring DAO classes throw throws exceptions which are subclasses to org.springframework.dao.DataAccessException Que2 : Name the exceptions thrown by the Spring DAO classes ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Que3 : What are classes present in spring JDBC API ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access JdbcTemplate SimpleJdbcTemplate NamedParameterJdbcTemplate SimpleJdbcInsert SimpleJdbcCall JDBC API Que3 : What are classes present in spring JDBC API ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Que4 : In which ways Hibernate can be accessed by using Spring ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access There are 2 ways of accessing hibernate by using Spring : Inversion of Control with a Hibernate Template and Callback Extending HibernateDAOSupport and Applying an AOP Interceptor node Que4 : In which way Hibernate can be accessed by using Spring ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Que5 : Name the types of transaction management that Spring supports ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Programmatic transaction management Declarative transaction management • Transaction is managed with the help of programming. • This provides extreme flexibility, but it is difficult to maintain. • Transaction management is separated from the business code. • Only annotations or XML based configurations are used to manage the transactions. Que5 : Name the types of transaction management that Spring supports ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access Que6 : What are the ORM’s supported by Spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-Data Access OJB Que6 : What are the ORM’s supported by Spring?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que1: Describe AOP?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP • Technique which allows the programmers to modularize crosscutting concerns, or behavior that cuts across the typical divisions of responsibility. • The core construct of AOP is the aspect, which encapsulates behaviors affecting multiple classes into reusable modules. Que1: Describe AOP?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que2 : What do you mean by Aspect ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Aspect Source-method Target-method Method call Point Cut Joint Point A modularization of a concern that cuts across multiple objects Que2 : What do you mean by Aspect ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que3 : Explain JointPoint?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP • A point during the execution of a program, such as the execution of a method or the handling of an exception. • In Spring AOP, a join point always represents a method execution. JoinPoints Method Execution Que3 : Explain JointPoint?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que4 : What is an Advice ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP • Action taken by an aspect at a particular join point. • Different types of advice include • "around,“ • "before" • "after" • Many AOP frameworks model an advice as an interceptor, maintaining a chain of interceptors "around" the join point. JointPoints Method Execution Advice Aspect Que4 : What is an Advice ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP 1 Que5 : What are the different types of Advices?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Before 1 After returning After throwing After(finally) Around Advice Que5 : What are the different types of Advices?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que6 : Point out the difference between concern and cross-cutting concern in Spring AOP ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP 1 Concern Cross-Cutting Concern It is behaviour we want to have in a module of an application It is a concern which is applicable throughout the application and it will affect the entire application Que6 : Point out the difference between concern and cross-cutting concern in Spring AOP ? Cross cutting concern Concern Module 2 Module 3Module 1 Module 2 Module 3Module 1
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que7 : What are the different AOP implementations ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Spring AOP Apache AspectJ JBoss AOP AOP Implementation Que7 : What are the different AOP implementations ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que8 : What are the difference between Spring AOP and AspectJ AOP?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Spring AOP AspectJ AOP • Runtime weaving through proxy • Supports only method level PointCut • DTD based • Compile time weaving through AspectJ Java Tools • Suports field level Pointcuts • Schema based and Annotation configuration Que8 : What are the difference between Spring AOP and AspectJ AOP?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que9 : What do you mean by Proxy?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP • The object created after applying advice to a target object • In respect to client objects, the target object and the proxy object are the same Advice Target Object Proxy Que9 : What do you mean by Proxy?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP Que10 : In Spring what is Weaving?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-AOP • When an aspect is linked with other application types or object to create an advised object, this process is called Weaving. • This can be performed at o compile time o runtime o load time • In spring framework weaving is performed at runtime. Que10 : In Spring what is Weaving?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations Agenda For Today
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC Que1: What do you mean by Spring MVC framework?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING View Resolver Spring Interview Questions-MVC DispatcherServlet Handler Mapping Controller 1 32 View 3 4 HTTP Request HTTP Response• Provides model-view-controller architecture • Ready to use components that can be used to develop flexible and loosely coupled web applications • Separates the different aspects of the application Que1: What do you mean by Spring MVC framework?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC Que2 : Describe DispatcherServlet ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC • DispatcherServlet handles all the HTTP requests and responses • The Spring Web MVC framework is designed around DispatcherServlet Http Request DispatcherServlet Http Request Que2 : Describe DispatcherServlet ?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC Que3 : Explain WebApplicationContext.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC ApplicationContext WebApplicationContext • The WebApplicationContext is an extension of ApplicationContext • WebApplicationContext has some extra features which are necessary for web applications. • It is also capable of resolving themes, and it knows which servlet it is associated to. Que3 : Explain WebApplicationContext.
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC Que4 : In Spring MVC framework, what is controller?
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Spring Interview Questions-MVC • Spring controller provides access to the application behaviour • User input is interpreted by the controller and are transformed into a model which is represented to the user by the view. • Spring controller enables to create a wide variety of controllers Controller View Model Request ResponseUser Que4 : In Spring MVC framework, what is controller? Browser
` https://www.edureka.co/spring-frameworkEDUREKA SPRING FRAMEWORK CERTIFICATION TRAINING Agenda For Today Spring General Questions Spring Dependency Injection/IoC Spring Beans Spring Data Access Spring AOP Spring MVC Spring Annotations
Thank You … Questions/Queries/Feedback

Spring Interview Questions and Answers | Spring Tutorial | Spring Framework Training | Edureka