Spring-Boot-101 Flashcards
What is the default parent package
spring-boot-starter-parent
What is the default groupid for all the maven dependencies?
org.springframework.boot
What is basically provided by the spring starter package
A server & a Main class
Which starter package is for web app?
spring-boot-starter-web
Which archetype will generate webapp in maven?
maven-archetype-webapp
What dependency we require to add the JSON, Joda & XM Conversion capabilities?
We need to include jackson jar:
groupId : com.fasterxml.jackson.core
artifactId : jackson-databind
groupId : com.fasterxml.jackson.datatype
artifactId : jackson-datatype-joda
groupId : com.fasterxml.jackson.dataformat
artifactId : jackson-dataformal-xml
What is the default groupid for jackson ?
com.fasterxml.jackson.*
What does does?
It scans all the classes that to be Autowired.
It includes @Service, @Configuration.
What does?
It tells that the app is a web app & thus scan and accentuate all the classes marked with @Controller Or @RestController & their methods @RequestMapping
What produces does in RequestMapping attribute types ?
It tells the Spring app what to do when their is a request with a specified header that is Accept : application/xml Or application/json, then respond accordingly.
What is jsonMapper and xmlMapper classes meant for?
This are the classes to help and format the data and create the right mapper
What tag does?
This tag tells from where the jar files to be loaded, as generally pom.xml;
What does?
This tag tells the spring data and spring container , the location of interface extended CRUDRepository
What does?
This tag has multiple usages, one of the usage that it tells from where the genesis scripts to be used and run
jpaVendorAdapter bean?
It tells the JPA implementor to be used, as Hibernate
What is EntityManageFacory bean?
For all the JPA implementations , it is required to have a EntityManageFactory bean , as it creates the session and eexecute all the sql staments.
What is TransactionManager dean?
This will create helping transactions, this will be compliant with ACID
What is ACID
Atomicity, Consistency, Isolation, Durability
What does does?
This will help setting up the transactions in the app
What does viewResolverBean states?
It states the view the app will make use of , jsp or jsf…
What does h2WebServer bean?
As H2 is an inmemory DB in Spring , this will quick do it
What do we require in persistence.xml?
We only require to have tag >
Does it require to declare the data classes in persistencexml?
No only persistence-unit name is required, rest will be taken care by Spring data
What is logback.xml
It is for Loggers
What are the main elements of logback
appender & logger & root