CS1331 spring boot review

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/29

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:41 PM on 12/9/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

30 Terms

1
New cards

does spring boot act as a queue or a stack?

stack, last in first out for tasks

2
New cards

What is the order for component data flow?

browser → controller → service → repository → database → then reverse to get back to browser

3
New cards

what does the browser do?

sends HTTP request and displays the HTML

4
New cards

what does the controller do?

handles requests (Spring MVC) (@GetMapping @PostMapping(“\…”)

5
New cards

What does service do?

handles business logic

6
New cards

What does repository do?

gives data access (Spring Data JPA)

7
New cards

what does database do?

stores tasks (H2)

8
New cards

what does view do?

template rendering HTML (thymeleaf)

9
New cards

what does @SpringBootApplication do?

turns on autoconfiguration, starts component scanning for beans, boots embedded server (default is port 8080)

10
New cards

what 2 annotations are needed to generate a random ID?

@ID @GeneratedValue(strategy = GenerationType.IDENTITY)

11
New cards

what is a bean?

an object created and managed by Spring

12
New cards

what are 5 common annotations to create beans in the IoC container?

@Component, @Service, @Repository, @Controller, @RestController

13
New cards

what does @Component annotation do

annotation indicating a bean that represents a generic spring managed class

14
New cards

what does @Service annotation do

annotation indicating a bean that represents business logic

15
New cards

what does @Repository annotation do?

annotation indicating a bean that represents a data access layer

16
New cards

What does @Controller annotation do?

annotation indicating a bean that represents MVC controller and returns views

17
New cards

What does @RestController annotation do?

annotation indicating a bean that returns JSON

18
New cards

How is dependency injection applied?

no new keyword is used and the dependency is listed in the constructor parameters. The class should be labeled as @Service or @Controller. Spring framework then handles the rest

19
New cards

What is IoC/ Inversion of Control?

spring framework control object creation and decides how to build the dependencies we list in the constructors

20
New cards

What is TodoController dependent on?

___ is dependent on TodoService

21
New cards

What is TodoService dependent on?

___ is dependent on TodoRepository

22
New cards

What is the flow within MVC?

browser←→ controller ←→ model ←→ view

23
New cards

what does model do in MVC?

manages data and rules (ex: Todo)

24
New cards

what does view do in MVC?

(thymeleaf) : controllers, services, repositories, configuration classes

25
New cards

what does controller do in MVC?

has methods handling HTTP requests and chooses which view and model to send back to the browser

26
New cards

how would you give code to show if there is an error in the model and what would control it?

th:if=”${error}” controlled in the model

27
New cards

how would you give code to print an error message and where would it be controlled?

th:text= “${error}” controlled in view

28
New cards

What do GETs do?

they show form and list

29
New cards

What do POSTs do?

they handle submissions

30
New cards

where does the main user interaction with spring boot occur?

with GET and POST