Which filter class is needed for spring security?
org.springframework.web.filter.DelegatingFilterProxy.
What are access controls in spring security?
To access the account list, you must be authenticated.
The files in the directory "/secure" should only be visible to authenticated users.
The files in the directory "/secure/extreme" should only be visible to Supervisors.
Withdrawal and deposits can be made only by Tellers and Supervisors.
Overdraft limit for an account can be exceeded only by Supervisors
How to restrict static resources processed by spring security filters?
< http pattern="/static/**" security="none" / >
From the applications perspective, how many user roles needed in spring security.
Three user roles are there in spring.
Supervisors
Tellers
Plain Users
Will Spring Security secure all the applications?
No, in web application, we need to do some more things to secure full application to save from attackers.
How to add security to method calls made on Spring beans in the application context?
< global-method-security pre-post-annotations="enabled" / >
Which java and spring version are needed for spring security?
Spring security 3.0 and jdk 1.5.
What are all security layers in spring security framework?
Authentication:
Web request security
Service layer and domain object security
When I login in the application where spring security is applied and got the messages "Bad Credentials". What is wrong
Authentication has failed for the given userid and password.
It happens when login page is secured resource. Login page should not be secured, it should be marked as ROLE_ANONYMOUS.
What is a spring?
Spring is set to be a framework which helps Java programmer for development of code and it provides IOC container, Dependency Injector, MVC flow and many other APIs for the java programmer.
What are Advices in Spring?
It is the execution of an aspect. Advice is like making your application learn a new trick. They are usually introduced at joinpoints.
What is the default scope of bean in Spring framework?
The default scope of bean is Singleton for Spring framework.
Name the types of transaction management that are supported by Spring?
Transaction management supported by Spring are:
Declarative transaction management.
Programmatic transaction management.
Is Singleton beans are thread safe in Spring Framework?
No, singleton beans are not thread-safe in Spring framework.
What are the benefits of Spring Framework?
Following are the benefits of Spring framework:
Extensive usage of Components
Reusability
Decoupling
Reduces coding effort by using pattern implementations such as singleton, factory, service locator etc.
Removal of leaking connections
Declarative transaction management
Easy to integrate with third party tools and technologies.
What is Bean Factory?
Bean Factory is core of the spring framework and, it is a Lightweight container which loads bean definitions and manages your beans.  Beans are configured using XML file and manage singleton defined bean. It is also responsible for life cycle methods and injects dependencies. It also removes adhoc singletons and factories.
Define Bean Wiring?
Bean wiring is the creation of associations between application components that are between the beans in a particular spring container.
What is called Spring MVC?
A Spring MVC is a single shared controller instance and it is used to handle request type controllers, interceptors which run in the IoC container. It also allows multiple Dispatcher Servlets which can share application context interface but not class based interface.
Why Spring framework is needed?
Spring framework is needed because it is –
Very Light Weight Container
Framework
IOC
AOP
Name the various modules used in spring framework?
AOP module (Aspect Oriented Programming)
JDBC abstraction and DAO module
The Core container module
MVC framework module
Application context module
O/R mapping integration module (Object/Relational)
Web module
Explain the RowCallbackHandler in Spring?
The RowCallbackHandler is called for each row in ResultSet and is used to read values from the ResultSet.
Define Application context module?
This is a very important module and supplies various necessary services like EJB integration, remoting, JNDI access and scheduling. It transforms spring into a framework. It also broadens the idea of BeanFactory by application of lifecycle events, providing support for internationalization messages and validation.
Write about AOP module?
AOP module is utilized for creating aspects for Spring applications. It also enables support for metadata programming in Spring.
What is a BeanFactory Interface?
Bean factory interface is used to provide configuration framework for object creation and basic functionality around object management.
State the differences between ApplicationContext and BeanFactory in spring?
ApplicationContext allows more than one config files to exist while BeanFactory only permits one.
ApplicationContext can print events to beans registered as listeners. This feature is not supported by BeanFactory.
ApplicationContext also provides support for application of lifecycle events, internationalization messages and validation and also provides services like EJB integration, remoting, JNDI access and scheduling. These features too are not supported by Bean Factory.
What is Auto Wiring?
Autowiring is used to build relationships between the collaborating beans. Spring container can automatically resolve collaborators for beans.
What are the different Modes of Autowiring?
Autowiring has five different modes:
no: no autowire
byName: Autowiring that can be done by property name
byType: property type as autowired
constructor: It is similar to byType and it is property is in constructor
autodetect:  Spring is allowed to select autowiring from byType or constructor
How to start using spring?
Following steps needs to be done to start with the Spring:
Download Spring and its dependent file from spring’s site.
Create application context xml to define beans and its dependencies
Integrate application context xml with web.xml
Deploy and Run the application
What are the methods of bean life cycle?
There are two important methods of Bean life cycle:
Setup – called when bean is loaded into container

Teardown – called when bean is unloaded into container
Request to Download PDF

Post A Comment:

0 comments: