Sprinh Profesional Test
Sprinh Profesional Test
OVERVIEW 3
LOGISTICS 4
THE EXAM 4
EXAM FAQ 4
TOPICS 5
CONTAINER, DEPENDENCY, AND IOC 5
ASPECT ORIENTED PROGRAMMING 6
DATA MANAGEMENT: JDBC, TRANSACTIONS 6
SPRING DATA JPA 8
SPRING MVC AND THE WEB LAYER 8
SECURITY 8
REST 9
TESTING 9
Spring Boot Intro 9
Spring Boot Auto Configuration 10
Spring Boot Actuator 11
Spring Boot Testing 11
RESOURCES 12
Conclusion 12
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 2
Overview
This guide is designed to help you prepare for the Spring Professional certification exams.
The certification exam is based on the learning outcomes for the 4-day Core Spring training
and the materials provided with it are the ideal source to use for preparation. Of course, as
with any certification, the most valuable part, besides recognition, is the learning process.
Hence, we encourage you to take time to experiment and follow your curiosity when questions
arise.
While we recommend the 4-day Core Spring course as the best way to prepare, you are now
free to simply purchase the exam voucher and take the exam without attending the 4-day
class. This presumes that you have learned the Spring concepts on your own. Still, there are a
lot of concepts covered in the exam. To help you focus your efforts and to know when you're
ready, we've put together this guide. The guide contains a list of topics and a list of further
resources. Topics are organized by subject area, where each topic contains a description of
what you should make sure you know.
The list of topics can be used as a check-list. The training materials can be used as a point of
reference and as a learning ground. The list of resources is where you can go further for
getting answers. Everything in the exam is covered somewhere in the course notes.
One possible way to prepare is to do the following for a given training module (assuming you
have taken the 4-day class):
1. Review the slides, making notes of questions
2. Work through the labs
3. Review the list of topics that matches to the module by subject area
4. Use the lab to experiment with anything you need to spend more time on
5. Use the provided list of resources to look for further answers
6. Reading (at least partially) the reference documentation
7. Memorize the "big pictures", tables, overviews, etc.
Of course, there are many more ways to organize your efforts. You can pair up with someone
else planning to take the exam or review all presentations for a given subject area before
going through the labs. Or maybe you have access to actual applications you can review to
test your knowledge.
Please keep in mind that you are expected to have good working knowledge of all the topics
listed. Most of the questions will be very general, however you will be asked a few advanced
questions.
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 3
Logistics
When you are ready to test and validate your product knowledge, please
visit pivotal.io/training/certification to purchase an industry-recognized Pivotal certification
exam.
Pivotal partners with Exams Local to remotely proctor our exams. Our certification exams may
be taken from a location of your choosing anywhere in the world provided you can meet
the basic system and test environment requirements and have a valid form of photo
identification.
For help with your exam purchase, exam registration process, credentials verification, or other
questions related to our certification program, process, and procedures, please
visit pivotal.io/training/faq/certification.
The Exam
The exam itself is a computer-based exam. The exam software first gives you some general
instructions: how to navigate, how to mark a question, and so forth - please read it carefully.
Once you have agreed that you want to start, you have 90 minutes to answer 50 multiple-
choice questions. You must answer 38 questions correctly (76%) in order to pass the exam.
Basic exam technique applies: read each question carefully and answer the question that was
asked not what you thought was asked.
Exam FAQ
1. Is there anything in the exam, which was not covered in the course?
Mostly no. BUT please note that @Secured and the Spring Security JSP tag library
may be referenced in the exam and are not in the main course notes.
2. Do I have to know class names and method signatures?
No. We think that this is why you are using an IDE - for us it's much more important
that you've understood the concepts rather than learning API and method signatures.
3. Do I have to write, complete or rearrange source code?
No. The only thing you should be able to do is read a snippet of code and understand
what it's doing. For example, we might show you a class implementing a Spring
callback and you will then see a couple of related questions. We do not ask you
questions on things an IDE can do for you, like checking if the code will compile.
4. Do I have to know any other APIs like AspectJ expression language in detail?
No. Of course, you should be able to read, understand and use AspectJ expression
language (pointcut expressions) wherever it is necessary to configure Spring AOP –
but this is not an exam about AspectJ.
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 4
5. Are the advanced slides part of the exam?
No. Only the content presented before each chapter lab slide will be on the exam. Any
course content presented after the chapter lab will not be in the exam. No content from
the optional chapters will be on the exam.
Topics
The following is a list of topics, each of which is likely to have questions on the exam.
Several of the bullet points below overlap, asking the same (or a related) question in a
different way. The answer to more than one bullet point question may be the same as the
answer to another question just before or after. Don't let this confuse you.
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 5
• What is the behavior of the annotation @Autowired with regards to field injection,
constructor injection and method injection?
• What do you have to do, if you would like to inject something into a private field? How does
this impact testing?
• How does the @Qualifier annotation complement the use of @Autowired?
• What is a proxy object and what are the two different types of proxies Spring can create?
• What are the limitations of these proxies (per type)?
• What is the power of a proxy object and where are the disadvantages?
• How do you configure profiles? What are possible use cases where they might be useful?
• Can you use @Bean together with @Profile?
• Can you use @Component together with @Profile?
• How many profiles can you have?
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 6
• For example, in the course we matched getter methods on Spring Beans, what would
be the correct pointcut expression to match both getter and setter methods?
• What is the JoinPoint argument used for?
• What is a ProceedingJoinPoint? When is it used?
• What is the Template design pattern and what is the JDBC template?
• What is a callback? What are the three JdbcTemplate callback interfaces that can be used
with queries? What is each used for? (You would not have to remember the interface
names in the exam, but you should know what they do if you see them in a code sample).
• Can you execute a plain SQL statement with the JDBC template?
• When does the JDBC template acquire (and release) a connection, for every method
called or once per template? Why?
• How does the JdbcTemplate support generic queries? How does it return objects and
lists/maps of objects?
• What is a transaction? What is the difference between a local and a global transaction?
• Is a transaction a cross cutting concern? How is it implemented by Spring?
• How are you going to define a transaction in Spring?
• What does @Transactional do? What is the PlatformTransactionManager?
• Is the JDBC template able to participate in an existing transaction?
• What is a transaction isolation level? How many do we have and how are they ordered?
• What is @EnableTransactionManagement for?
• What does transaction propagation mean?
• What happens if one @Transactional annotated method is calling another
@Transactional annotated method on the same object instance?
• Where can the @Transactional annotation be used? What is a typical usage if you put it
at class level?
• What does declarative transaction management mean?
• What is the default rollback policy? How can you override it?
• What is the default rollback policy in a JUnit test, when you use the
@RunWith(SpringJUnit4ClassRunner.class) in JUnit 4 or
@ExtendWith(SpringExtension.class) in JUnit 5, and annotate your @Test annotated
method with @Transactional?
• Why is the term "unit of work" so important and why does JDBC AutoCommit violate this
pattern?
• What do you need to do in Spring if you would like to work with JPA?
• Are you able to participate in a given transaction in Spring while working with JPA?
• Which PlatformTransactionManager(s) can you use with JPA?
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 7
• What do you have to configure to use JPA with Spring? How does Spring Boot make this
easier?
Security
• What are authentication and authorization? Which must come first?
• Is security a cross cutting concern? How is it implemented internally?
• What is the delegating filter proxy?
• What is the security filter chain?
• What is a security context?
• Why do you need method security? What type of object is typically secured at the method
level (think of its purpose not its Java type).
• What do @PreAuthorized and @RolesAllowed do? What is the difference between them?
• How are these annotations implemented?
• In which security annotation are you allowed to use SpEL?
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 8
REST
• What does REST stand for?
• What is a resource?
• What does CRUD mean?
• Is REST secure? What can you do to secure it?
• Is REST scalable and/or interoperable?
• Which HTTP methods does REST use?
• What is an HttpMessageConverter?
• Is REST normally stateless?
Testing
• Do you use Spring in a unit test?
• What type of tests typically use Spring?
• How can you create a shared application context in a JUnit integration test?
• When and where do you use @Transactional in testing?
• How are mock frameworks such as Mockito or EasyMock used?
• How is @ContextConfiguration used?
• How does Spring Boot simplify writing tests?
• What does @SpringBootTest do? How does it interact with @SpringBootApplication
and @SpringBootConfiguration?
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 9
• What is a Spring Boot starter POM? Why is it useful?
• Spring Boot supports both properties and YML files. Would you recognize and understand
them if you saw them?
• Can you control logging with Spring Boot? How?
• Where does Spring Boot look for property file by default?
• How do you define profile specific property files?
• How do you access the properties defined in the property files?
• What properties do you have to define in order to configure external MySQL?
• How do you configure default schema and initial data?
• What is a fat far? How is it different from the original jar?
• What is the difference between an embedded container and a WAR?
• What embedded containers does Spring Boot support?
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 10
• What dependencies does spring-boot-starter-test brings to the classpath?
• How do you perform integration testing with @SpringBootTest for a web application?
• When do you want to use @WebMvcTest? What does it auto-configure?
• What are the differences between @MockBean and @Mock?
• When do you want @DataJpaTest for? What does it auto-configure?
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 11
Resources
http://spring.io/blog
Blog: Point your favorite RSS reader or come back for detailed, quality posts by Spring
developers.
http://docs.spring.io/spring/docs/current/spring-framework-reference
Reference: The reference documentation (800+ pages) is available as html pages, a single
html page and as a PDF document.
http://docs.spring.io/spring/docs/current/javadoc-api
Javadoc API
http://springbyexample.org
Spring By Example: Another good repository with good code samples is SpringByExample.
Conclusion
When you worked through this guide and know all the answers, we are pretty confident that
you should pass the certification. It's recommended to do it as soon as possible and we wish
you good luck with it.
Thank you again for choosing Pivotal as your education partner and good luck with your
projects.
If you have encountered any errors, have any suggestions or enquiries please don't hesitate to
contact your trainer or send an email to [email protected].
March 2019 © Copyright 2019 Pivotal Software, Inc. All rights reserved 12