Which two annotations indicate that the transaction for a transactional test method should be committed after the test method has completed? (Choose two.)
A. @Rollback(false)
B. @Sql(alwaysCommit=true)
C. @Transactional(commit=true)
D. @SqlMergeMode(false)
E. @Commit
正解:A,E
質問 2:
Which statements is true?
A. @AfterEach annotation must be used on a cleanup method when @BeforeEach is used.
B. Methods annotated with @BeforeAll will run only once before any tests in a class are executed.
C. @BeforeAll annotation can only be used on non-static methods.
D. Methods annotated with @AfterEach will run only once before any tests in a class are executed.
正解:B
質問 3:
Which two statements are correct when @SpringBootApplication is annotated on a class? (Choose two.)
A. Component scanning will start from the package of the class.
B. A separate ApplicationContext will be created for each class annotated with
C. All other annotations on the class will be ignored.
D. It causes Spring Boot to enable auto-configuration by default.
E. Methods in the class annotated with @Bean will be ignored.
正解:A,D
解説: (Pass4Test メンバーにのみ表示されます)
質問 4:
Which strategy is correct for configuring Spring Security to intercept particular URLs? (Choose the best answer.)
A. The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the least specific rule first and the most specific last.
B. Spring Security can obtain URLs from Spring MVC controllers, the Spring Security configuration just needs a reference to the controller to be protected.
C. The URLs can be specified via configuration (using authorizeRequests () and request matchers), with the most specific rule first and the least specific last.
D. The URLs are specified in a special properties file, used by Spring Security.
正解:C
解説: (Pass4Test メンバーにのみ表示されます)
質問 5:
Which statement is true? (Choose the best answer.)
A. @ActiveProfiles is a class-level annotation that you can use to configure the locations of properties files and inlined properties to be added to the set of PropertySources in the Environment for an ApplicationContext loaded for an integration test.
B. @ActiveProfiles is a class-level annotation that is used to instruct the Spring TestContext Framework to record all application events that are published in the ApplicationContext during the execution of a single test.
C. @ActiveProfiles is a class-level annotation that is used to declare which bean definition profiles should be active when loaded an ApplicationContext for an integration test.
D. @ActiveProfiles is a class-level annotation that you can use to configure how the Spring TestContext Framework is bootstrapped.
正解:C
解説: (Pass4Test メンバーにのみ表示されます)
質問 6:
What's the password storage format when using the DelegatingPasswordEncoder?
A. {id}{salt}encodedPassword, where {id} is an identifier used to look up which PasswordEncoder should be used and {salt} a randomly generated salt.
B. encodedPassword{id}, where {id} is an identifier used to look up which PasswordEncoder should be used.
C. {id}encodedPassword, where {id} is an identifier used to look up which PasswordEncoder should be used.
D. {timestamp}encodedPassword, where {timestamp} is the time when the password was encoded.
正解:C
解説: (Pass4Test メンバーにのみ表示されます)
質問 7:
Which statement about @TestPropertySource annotation is true? (Choose the best answer.)
A. Properties defined @PropertySource are not loaded if @TestPropertySource is used.
B. @TestPropertySource annotation loads a properties file relative to the root of the project by default.
C. Inlined properties defined in @TestPropertySource can be used to override properties defined in property files.
D. Java system properties have higher precedence than the properties loaded from
@TestPropertySource.
正解:C
Senou -
解説があるので時間短縮できて使いやすいです。とくにPass4Testさんが開発したアプリバージョンは大のお気に入りです。