Spring Flashcards

To enhance knowledge of Spring for webdev

1
Q

What is Spring

A

A framework for enterprise Java applications

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are Springs benefits

A

IoC, DI, MVC, Boilerplate Reduction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some spring sub projects

A

Core - Inversion of Control, DepInjectoin
Web - Provides Application Context
JDBC-Provides DB classes like JDBC Template
MVC - Model View Controller
ORM - JPA, JDO, Hibernate
DI - Describe how to create objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How to inject beans

A

Setter, Constructor, Field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

BeanFactory

A

An interface representing the container of all bean instances

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

ApplicationContext

A

A container that holds all metadata, data, and beans of the application

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Bean

A

A POJO Initialized by Spring

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Default Bean Scope

A

Singleton

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Are Beans Thread Safe

A

Not if Singleton

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Java Config used for?

A

Configuring the Spring application instead of using xml

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Can you have more than one config file for spring?

A

Yes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Spring Security

A

A module that provides authentication methods

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Spring Boot

A

A preconfigured project to cut boilerplate. Like create-react-app.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Spring Prototype Pattern

A

Used to generate multiple instances of a bean.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

@RequestMapping

A

Used to tie an http request to a method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the config file for your db. It describes the datasource.

A

JDBC Template

17
Q

What is Aspect Oriented Programming?

A

Aspect Oriented Programming when a regex (PointCut) matches the variable (JoinPoint) being evaluated, then a method (Advice) is executed.

18
Q

What is Weaving

A

The process spring uses to tie aspects to objects.

19
Q

What coding paradigm uses events to horizontally scale?

A

Reactive Programming - Analogous to microservices, the concept of using events to scale your classes.

20
Q

How does spring 5 work with java 9?

A

Spring 5 and java 9: Everything is modularized. A module is a level above packages. Analogous to container classes in react and angular modules.

21
Q

What is a conditional

A

Used to specify the order of bean instantiation. E.g. if Bean A requires bean B to be loaded, you can ensure that B is instantiated before A.