暗記メーカー
ログイン
hard questions
  • ユーザ名非公開

  • 問題数 38 • 1/23/2025

    記憶度

    完璧

    5

    覚えた

    16

    うろ覚え

    0

    苦手

    0

    未解答

    0

    アカウント登録して、解答結果を保存しよう

    問題一覧

  • 1

    Which statement is true about the @PropertySource annotation? (Choose the best answer.)

    • Used to add a set of name/value pairs to the Spring Environment from an external source.

  • 2

    Which three statements are advantages of using Spring’s Dependency Injection? (Choose three.)

    Dependencies between application components can be managed external to the  components. , Configuration can be externalized and centralized in a small set of files., Dependency injection facilitates loose coupling between components. 

  • 3

    Which two statements are correct when @SpringBootApplication is annotated on a class?  (Choose two.)

    It causes Spring Boot to enable auto-configuration by default., Component scanning will start from the package of the class. 

  • 4

    Refer to the exhibit.  Clientservice service applicationContext.getBean (Clientservice.class);  It is a Java code fragment from a Spring application. Which statement is true with regard to the  above example? (Choose the best answer.)

    It will return a bean of the type ClientService regardless of its id or name. 

  • 5

    Which strategy is correct for configuring Spring Security to intercept particular URLS? (Choose  the best answer.)

    The URLS can be specified via configuration (using authorizeRequests () and request  matchers), with the most specific rule first and the least specific last. 

  • 6

    In which three ways are Security filters used in Spring Security? (Choose three.)

    To drive authentication. , To enforce authorization (access control). , To provide a logout capability.

  • 7

    Refer to the exhibit.  @Bean  @ConditionalOnBean (name= "dataSource")  public JdbcTemplate jdbcTemplate (DataSource dataSource) {  }  return new JdbcTemplate (dataSource);  The above code shows a conditional @Bean method for the creation of a JdbcTemplate bean. Which two statements correctly describe the code behavior? (Choose two.)

    @ConditionalOnBean(name = "dataSource") should be replaced with @Conditional On Bean  (DataSource.class) for greater flexibility. , A JdbcTemplate bean will be created when a bean named dataSource has already been  created 

  • 8

    Which two statements are true regarding result set handling? (Choose two.)

    JdbcTemplate can return each row of a ResultSet as a Map. , RowMapper interface is used for mapping a single row of a ResultSet to an object. 

  • 9

    Which two ways to access the properties defined in an application.properties or application.yml  file are correct? (Choose two.)

    Through the getProperty() method of the Spring Environment object. , Through a constructor parameter annotated with @Value. 

  • 10

    Which two statements are true about the @RequestMapping annotation? (Choose two.)

    It can be used as an alternative to @GetMapping or @PutMapping using method attribute. , It is an annotation for mapping web requests to controller methods. 

  • 11

    What is a Spring Boot starter dependency? (Choose the best answer.)

    An easy way to include multiple, coordinated dependencies related to a specific  technology, like web or JDBC. 

  • 12

    Which two are required to use transactions in Spring? (Choose two.)Which two are required to use transactions in Spring? (Choose two.)

    Add @Enable TransactionManagement to a Java configuration class. , Annotate a class, an interface, or individual methods requiring a transaction with the  @Transactional annotation. 

  • 13

    Which two statements about the @Autowired annotation are true? (Choose two.)Which two statements about the @Autowired annotation are true? (Choose two.)

    Multiple arguments can be injected into a single method using @Autowired. , @Autowired can be used to inject references into BeanPostProcessor and  BeanFactoryPostProcessor.

  • 14

    Which two statements are correct regarding the @EnableAutoConfiguration annotation? (Choose  two.)

    It is a meta-annotation on the @SpringBootApplication composed annotation. , It enables auto-configuration of the ApplicationContext by attempting to guess necessary  beans.  

  • 15

    Which two statements are true concerning the BeanPostProcessor Extension point? (Choose  two.)

    Custom BeanPostProcessrs can be implemented for Spring applications. , BeanPostProcessors are called during the initialization phase of a bean life cycle. 

  • 16

    Refer to the exhibit.  public interface CustomerRepository extends CrudRepository<Customer, Long>{ }  Which statement is true? (Choose the best answer.)

    An implementation of this repository can be automatically generated by Spring Data JPA. 

  • 17

    Which two statements are correct regarding the Actuator info endpoint? (Choose two.)

    Typically it is used to display build or source control information. , It can be used to display arbitrary application information.

  • 18

    Which statement about @TestPropertySource annotation is true? (Choose the best answer.)

    Inlined properties defined in @TestPropertySource can be used to override properties  defined in property files. 

  • 19

    Which two statements are correct regarding the Health Indicator status? (Choose two.)

    The built-in status values are DOWN, OUT OF SERVICE, UNKNOWN, and UP in decreasing  order of severity. , Custom status values can be created. 

  • 20

    If a class is annotated with @Component, what should be done to have Spring automatically  detect the annotated class and load it as a bean? (Choose the best answer.)

    Ensure a valid @ComponentScan annotation in the Java configuration is specified. 

  • 21

    Which two options will inject the value of the daily limit system property? (Choose two.)

    @Value("#{systemProperties['daily.limit']}") , @Value("#{systemProperties.daily.limit)") 

  • 22

    Which two options are REST principles? (Choose two.)

    RESTful applications use a stateless architecture. , RESTful application use HTTP headers and status codes as a contract with the clients. 

  • 23

    Which option is true about use of mocks in a Spring Boot well test? (Choose the best answer.)

    Mocking a Spring Bean requires annotating it with @MockBean annotation. 

  • 24

    Which two statements are true regarding Spring Security? (Choose two.)

    Access control can be configured at the method level. , Authentication data can be accessed using a variety of different mechanisms, including  databases and LDAP

  • 25

    Which two statements are correct regarding Spring Boot auto-configuration customization?  (Choose two.)

    Disable specific auto-configuration classes by using the exclude attribute on the  @EnableAutoConfiguation annotation. , Use the @AutoConfigureAfter or @AutoConfigureBefore annotations to apply configuration  in a specific order. 

  • 26

    Which two statements are true regarding bean creation? (Choose two.)

    A Spring bean can be implicitly created by annotating the class with @Component and using  the component-scanner to scan its package., A Spring bean can be explicitly created using @Bean annotated methods within a Spring  configuration class. 

  • 27

    What are the two reasons Spring be used to build a Java application? (Choose two.)

    Spring provides a Dependency Injection container. , Spring provides abstractions over infrastructure such as persistence and messaging. 

  • 28

    1 Which two statements describe Spring JdbcTemplate? (Choose two.)

    The JdbcTemplate provides the ability to work with result sets. , The JdbcTemplate provides methods for query execution. 

  • 29

    Which statement defines a pointcut? (Choose the best answer.)

    An expression that selects one or more join points 

  • 30

    Which statement describes the propagation behavior of Propagation REQUIRES NEW annotation?  (Choose the best answer.)

    Starts a new transaction; if an active transaction already exists, it is suspended. 

  • 31

    Which two statements are correct regarding the differences between @Configuration Properties  and @Value? (Choose two.)

    @ConfigurationProperties is preferable over @Value when type-safety during property  binding is a concern. , @ConfigurationProperties supports relaxed binding of properties, but not property binding  through SpEL.

  • 32

    Which two statements are correct regarding the Actuator loggers endpoint? (Choose two.)

    To get a logging level of a package called account.web, you can access the  /actuator/loggers/account.web endpoint. , The logging levels of a package that can be accessed via the loggers endpoint include  configuredLevel and effectiveLevel.

  • 33

    Refer to the exhibit.  <dependencies>  <dependency>  <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-jdbc</artifactId> </dependency>  <dependency>  <groupId>org.hsqldb</groupId>  <artifactId>hsqldb</artifactId>  <scope>runtime</scope>  </dependency>  </dependencies>  Which two statements are correct regarding auto-configuration of DataSource and JdbcTemplate  beans given a Spring Boot application with only these two dependencies? (Choose two.)

    A JdbcTemplate bean will be auto-configured. , A DataSource bean will be auto-configured.

  • 34

    Which two statements are true about Spring AOP? (Choose two.)

    The @After advice type is invoked regardless of whether a method successfully returned or  an exception was thrown., Examples of cross-cutting concerns include security, caching, transaction. 

  • 35

    What are two ways to display http.server.requests metric using built-in tags? (Choose two.)

    Display information on HTTP requests whose response status is 404. , Display information on HTTP requests whose HTTP method is POST. 

  • 36

    Which two statements about BeanFactoryPostProcessors are true? (Choose two.)

    PropertySources PlaceholderConfigurer implements BeanFactoryPostProcessor and is  used to read property values from the Spring Environment. , Allows for the transformation of Spring bean definitions before the beans are instantiated. 

  • 37

    Refer to the exhibit.  @Configuration  @ConditionalOnClass (HelloService.class)  public class HelloAutoConfig {  @ConditionalOnMissingBean (HelloService.class)  @Bean  HelloService helloService () {  }  }  return new TypicalHelloService ();  Which two statements are correct regarding the HelloAutoConfig auto-configuration class when  it is specified in the META-INF/spring.factories file? (Choose two.)

    A HelloService bean will be created from the helloService() method only when there is no  other HelloService bean in the ApplicationContext. , This auto-configuration class is used only when the HelloService.class is on the classpath. 

  • 38

    Which two statements are true regarding @DataJpaTest? (Choose two.)

    TestEntityManager provides all methods that are provided by EntityManager and more. , If an embedded database is on the classpath, it will be used to configure a DataSource by  default.