
SpringBoot Day1,day2
Quiz
•
Information Technology (IT)
•
Professional Development
•
Easy
Kadavakallu Lokesh
Used 2+ times
FREE Resource
Enhance your content in a minute
25 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
Lokesh wants to configure application level properties
in a Spring-starter-project, In which
Lokesh can configure them?
server-config.xml
application.properties
settings.json
config.ini
Answer explanation
Lokesh can configure application-level properties in a Spring-starter-project using 'application.properties'. This file is specifically designed for defining configuration settings in Spring applications.
2.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
Nivetha wants to define dependencies ( 'spring-boot-starter-jpa','spring-boot-starter-thymeleaf') in her
Maven Based Spring boot project. In which file she need to define those dependencies?
application.properties
pom.xml
mvnw.cmd
dom.xml
Answer explanation
Nivetha needs to define dependencies in her Maven project within the 'pom.xml' file. This file is specifically used for managing project dependencies, plugins, and other configurations in Maven-based projects.
3.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
Which JPA method is used to insert a new entity into the database?
find()
persist()
merge()
remove()
insert()
Answer explanation
The correct method to insert a new entity into the database in JPA is 'persist()'. This method makes the entity instance managed and persistent, ensuring it is saved to the database.
4.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
What does the find() method in JPA do?
Finds an entity by its ID and returns a managed entity
Finds all entities in the database
Finds an entity and immediately deletes it
Checks if an entity is null
Answer explanation
The find() method in JPA retrieves an entity based on its ID, returning a managed instance of that entity. This is crucial for working with persistent data in a Java application.
5.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
Which JPA method is used to update an entity that is detached from the persistence context?
find()
persist()
update()
remove()
merge()
Answer explanation
The correct method to update a detached entity in JPA is 'merge()'. This method copies the state of the given entity onto the persistent entity with the same identifier, effectively updating it in the persistence context.
6.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
What does the remove() method do in JPA?
Removes an entity from the database
Removes an entity from the persistence context but not the database
Marks an entity as inactive
Moves the entity to an archive table
Answer explanation
The remove() method in JPA removes an entity from the database, effectively deleting it. This is why the correct answer is 'Removes an entity from the database', as it directly impacts the database state.
7.
MULTIPLE CHOICE QUESTION
1 min • 4 pts
Surekha created a Spring Boot project using Spring Initializr. Which dependency is required to use Spring Data JPA?
spring-boot-starter-web
spring-boot-starter-data-jpa
spring-boot-starter-thymeleaf
spring-boot-starter-security
Answer explanation
To use Spring Data JPA in a Spring Boot project, the required dependency is 'spring-boot-starter-data-jpa'. This starter includes the necessary libraries for JPA support, unlike the other options listed.
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
20 questions
HTML, CSS, Terminal & JavaScript
Quiz
•
Professional Development
20 questions
Topic 1 Question 81 to 100
Quiz
•
Professional Development
20 questions
CSS Basics Quiz
Quiz
•
Professional Development
27 questions
Post Test 2 - Basic Web WordPress
Quiz
•
Professional Development
29 questions
Xfinity Voice and Home Services Quiz
Quiz
•
Professional Development
30 questions
EDIT
Quiz
•
Professional Development
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Information Technology (IT)
10 questions
Halloween
Quiz
•
Professional Development
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
5 questions
11.4.25 Student Engagement & Discourse
Lesson
•
Professional Development
50 questions
ASL Colors and Clothes
Quiz
•
KG - Professional Dev...
15 questions
Ohms Law
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
