Spring Flashcards
What is Dependency Injection
A design pattern that passes concrete instances during object creation or initialization
What are the different cloud models and what do we get in each that we don’t in another.
OnSite: We manage Application, Data, Runtime, O/S, Middleware, Virtualization, Servers, Secutiy, Networking.
IAAS (EC2) : We manage Application, Data, Runtime, O/S, Middleware.
PAAS (Elastic Beanstalk): We manage Application and data
SAAS: everything is provided.
What calls the bean lifecycle and what is it?
Make a request to the IOC container Instantiate object Populate the properties setBeanName setBeanFactory Preinitialization CustomInit PostInitilization Then it's ready and in use Destroy Custom Destroy
Difference between a JoinPoint and a PointCut
A joinpoint is a place where advice can be injected in the method execution. A pointcut is a set of joinpoints and it tells Spring which joinpoints out of the cluster of joinpoints that you want to have that advice given to.
Different types of annotations
@Aspect @Component @Before @After @AfterThrowing @AfterReturning @Around
What are the beans that we need to configure in Spring ORM
DataSource which holds our DB credentials. This is then injected into the SessionFactory which holds our hibernate specific configurations, and then is injected into either our DAOs or the TransactionManager
What does the @Transactional do
This indicates that we want the annotated method to execute in the context of a transaction and we want that transaction managed by Spring.
What’s JSR 303?
Bean Validation