1.
Filters are called before a request hits the DispatcherServlet. They allow for interception-style, chained processing of web requests for security, timeouts, and other purposes.
2.
Filters are used with a checksum algorithm that will filter invalid bytes out of a byte stream request body and allow for processing of HTTP requests from the DispatcherRequestServlet.
3.
Filters are used with a checksum algorithm that will filter invalid bytes out of an octet stream a multipart upload and allow for chained processing of WebDispatcherServlet requests.
4.
Filters are used to validate request parameters out of the byte stream request body and allow for processing of requests from the DispatcherRequestServlet.
Q 1 / 68
1.
A resource is the actual String literal that composes a URI that is accessed on a RESTful web service.
2.
It is an abstract concept that represents a typed object, data, relationships, and a set of methods that operate on it that is accessed via a URI.
3.
A REST service has a pool of resources composed of allocations of memory that allow a request to be processed.
4.
A resource for a REST service is an explicit allocation of a thread or CPU cycles to allow a request to be processed.
Q 2 / 68
1.
@AfterError
2.
@AfterReturning
3.
@AfterException
4.
@AfterExecution
Q 3 / 68
1.
It supports internationalization of web applications by detecting a user's locale.
2.
It generates a view by mapping a logical view name returned by a controller method to a view technology.
3.
It creates a unique view determined by the uers's browser type,supporting cross-browser compatibility.
4.
It maps custom parameters to SQL views in the database, allowing for dynamic content to be created in the response.
Q 4 / 68
1.
Spring automatically generated code for you based on your YAML config that defined a MethodInterceptor chain that intercept calls to the instance and computed SQL on the fly.
2.
A JDK proxy instance is created, which backs the repository interface, and a MethodInterceptor intercepts calls to the instance and routes as required.
3.
The Spring JDK proxy creates a separate runtime process that acts as an intermediary between the database and the Web server, and intercepts calls to the instance and handles requests.
4.
Spring automatically generated code for you based on your XML config files that define a SpringMethodAutoGeneration factory that intercepts calls to the instance and creates dynamic method that computer SQL on the fly.
Q 5 / 68
1.
SpEL(Spring Expression Language) runs in the JVM and can act as a drop-in replacement for Groovy or other languages.
2.
SpEL(Spring Expression Language) supports boolean and relational operators and regular expressions, and is used for querying a graph of objects at runtime.
3.
SpEL(Spring Expression Language) allows you to build, configure,and execute tasks such as building artifacts and downloading object dependencies.
4.
SpEL(Spring Expression Language) natively transpiles one JVM language to another, allowing for greater flexibility.
Q 6 / 68
1.
dynamic chaining
2.
banding
3.
weaving
4.
interleaving
Q 7 / 68
1.
JDK Dynamic proxy can proxy only interface, so it is used if the target implements at least one interface. A CGLIB proxy can create a proxy by subclassing and is used if the target does not implement an interface.
2.
Only JDK Dynamic proxies are used in the Spring Bean Lifecycle. CGLIB proxies are used only for integrating with other frameworks.
3.
Only CGLIB proxies are used in the Spring Bean Lifecycle. JDK Dynamic proxies are used only for integrating with other frameworks.
4.
JDK Dynamic proxy can only using an abstract class extended by a target. A CGLIB proxy can create a proxy through bytecode interweaving and is used if the target does not extend an abstract class.
Q 8 / 68
1.
getArgs()
2.
getExceptions()
3.
getSignature()
4.
getTarget()
Q 9 / 68
1.
1. afterPropertiesSet() 2. init-method 3. @PostConstruct
2.
1. @PostConstruct 2. afterPropertiesSet() 3. init-method
3.
1. init-method 2. afterPropertiesSet() 3. @PostConstruct
4.
You cannot use these methods together-you must choose only one.
Q 10 / 68
1.
It's a transaction attribute configured by `spring.security.transactions.xml` config file that uses Spring's transaction implementation and validation code.
2.
It's a transaction that must actively validate by the bytecode of a transaction using Spring's `TransactionBytecodeValidator` class. Default Transaction behavior rolls back on validation exception but commits on proper validation
3.
It creates a proxy that implements the same interface(s) as the annotated class, allowing Spring to inject behaviors before, after, or around method calls into the object being proxied.
4.
It's a transaction that must be actively validated by Spring's `TransactionValidator` class using Spring's transaction validation code. Default Transaction behavior rolls back on validation exception.
Q 11 / 68
java @SpringBootApplication public class App { public static void main(String args[]) { SpringApplication.run(App.class, args); System.out.println("startup"); } } public class Print implements InitializingBean { @Override public void afterPropertiesSet() throws Exception { System.out.println("init"); } } init
1.
Nothing will print
2.
startup
3.
init
4.
startup
Q 12 / 68
java @Component public class Test implements InitializingBean { @Autowired ApplicationContext context; @Autowired static SimpleDateFormt formatter; @Override public void afterPropertiesSet() throws Exception { System.out.println(context.containsBean("formatter") + " "); System.out.println(context.getBean("formatter").getClass()); System.out.println(formatter.getClass()); System.out.println(context.getClass()); } } @Configuration class TestConfig { @Bean public SimpleDateFormat formatter() { return new SimpleDateFormat(); } }
1.
formatter.getClass()
2.
context.getClass()
3.
context.getBean("formatter").getClass()
4.
context.containsBean("formatter")
Q 13 / 68
1.
SpringInitContainer
2.
ResourceLoader
3.
ApplicationEventPublisher
4.
BeanFactory
Q 14 / 68
1.
@Secured
2.
@RequiresRole
3.
@RestrictedTo
4.
@SecurePath
Q 15 / 68
java @RestController public class SampleController { @RequestMapping("/map") public String map(@RequestParam("bar") String foo, @RequestParam("foo") String bar) { return bar + foo; } }
1.
An InvalidParameterNameMappingException is thrown at runtime.
2.
barfoo
3.
foobar
4.
A status code of 400 Bad Request is returned.
Q 16 / 68
1.
It prevents a bean from being created and injected until you run a specific CLI command. It reduces complexity in the application.
2.
It can be applied to a bean so that the bean is not persisted in the database. It reduces the number of database operations.
3.
It can be applied to a bean so that the bean is not created and injected until it is needed. It can help speed up startup time for your application.
4.
It prevents a bean from being created and injected until it receives a HTTP request to a callback hook. It reduces disk footprint.
Q 17 / 68
1.
a method by which objects define dependencies they need as abstractions that allows the framework to instantiate and configure them in a central location at runtime.
2.
a paradigm where dependent code is injected into the bytecode of a Java application on a remote server.
3.
a way of injecting remote dependencies into a pre-packaged JAR file from the file system.
4.
a way of injecting remote dependencies into a pre-packaged WAR file from the file system.
Q 18 / 68
1.
Reactive Enterprise Status Transfer is a web service comprising a set of guidelines and technical constraints for web services that monitor and alert of a set of mission-critical resources.
2.
Representational State Transfer an architectural style for creating web services that includes client-server architecture, statelessness, cacheability, a layered system, and a uniform interface.
3.
Redundant Enumerated State Transfer is a web service that provides redundancy in the case of failure and outlines technical constraints for web services that have access to resources.
4.
Reactive Enterprise State Transfer is a web service comprising a set of guidelines and technical constraints for web services y that have access to resources and are async in nature.
Q 19 / 68
1.
A controller bean definition is defined in the servlet's WebApplicationContext. The class is marked as a web component, and you can map requests to controller methods.
2.
A controller bean definition is defined in the Web Context, and Web Servlet is marked as a component that reads mapped controller requests from an XML config file.
3.
A controller bean definition is defined in the Tomcat Context, and the Controller Servlet is marked as a web component that reads mapped controller requests from a YAML config file.
4.
A controller bean definition is defined in the Servlet Context, and the Controller Servlet is marked as a component that reads mapped controller requests from an XML config file.
Q 20 / 68
1.
Port
2.
spring.port
3.
spring.settings.port
4.
server.port
Q 21 / 68
1.
to validate the char array contained in a response to ensure that it is a valid character encoding
2.
to generate a local byte stream from the body of a response that allows a request to be scanned for security risks
3.
to indicate whether a handler method return value should be bound to the web response body in servlet environments
4.
to ensure a ThreadLocal byte stream that allows a response to be encoded for reading directly into a socket stream
Q 22 / 68
1.
Mockito will spin up a mock web service hosted in a Docker container that can respond to HTTP requests to mock out third-party APIs.
2.
Mockito can use annotations or factory methods to create mock objects that may be injected into tests in place of dependencies. The behavior of mocks can be explicitly configured.
3.
Mockito will create mock users to repeatedly perform requests against your Spring application to test your app's ability to take load.
4.
Mockito will spin up a mock web service hosted in a Docker container that can respond to RPC calls to mock out remote resources.
Q 23 / 68
1.
DispatchingDelegatorServlet
2.
DispatcherServlet
3.
Router
4.
FrontControllerServlet
Q 24 / 68
1.
It instantiates and configures objects, supplied at runtime, to classes that define them as a dependency.
2.
It allows the front-end code to manage the ResponseBody objects provided by a back-end REST API.
3.
It allows a database to define business objects via a shared schema at compile time.
4.
It facilitates a remote server to configure a local application.
Q 25 / 68
1.
feature that scans packages for classes with specific annotations and, when found, creates their bean definitions within the IoC container
2.
paradigm where bytecode is actively scanned to identify additional optimizations to inject into components in the application context
3.
a method by which cloud repositories are scanned to identify components for injection into an IoC container
4.
a method by which binary data in a database is searched to identify components for injection into the IoC container
Q 26 / 68
1.
This annotation takes the String literal passed into the annotation as a parameter and automatically generates all the code for your application as per the passed in template parameter.
2.
This compound annotation applies the @Bootable, @Springify, and @StandardConfig annotations that launch a CLI tool after launching the Spring Boot WAR file that will guide you through a series of prompts to set up your app.
3.
This annotation scans the provided spring-boot-config-construction.yaml file in your root directory and automatically generates all the code for your application as defined in the YAML file.
Q 27 / 68
1.
Queries are explicitly coded in repository implementations using the Spring Data CriteriaBuilder.
2.
Query metadata is stored in the underlying datastore and retrieved at runtime per repository.
3.
Queries are derived from the signatures of methods on a Spring Data repository that contain keywords in their name for constructing the query logic.
4.
A spring-data-queries.xml file contains queries within entity tags that specify the query logic for each repository.
Q 28 / 68
1.
It uses the short name of the class with the first letter in lowercase.
2.
It uses the short name of the class.
3.
It uses the short name of the class in uppercase.
4.
It uses the canonical name of the class in lowercase.
Q 29 / 68
1.
It's the servlet filter chain proxy that handles all requests to the route defined in spring.security.xml. All calls to the filter proxy are forwarded to the ErrorDispatcherServlet.
2.
It's the servlet filter chain that handles requests to the route defined in spring.security.factories. All calls to the filter proxy y are forwarded to the ErrorServlet.
3.
It's the servlet filter proxy delegating to a filter bean specified in web.xml. All calls to the filter proxy will be delegated to that servlet filter bean.
4.
It's the web servlet daemon filter proxy that delegates to a bean specified in spring.security.factories. All calls to the filter proxy that do not contain a proper route will return an error.
Q 30 / 68
1.
It helps monitor and manage a Spring Boot application by providing endpoints such as health checks, auditing, metrics gathering, and HTTP tracing.
2.
It provides out-of-the-box functionality that integrates with third-party metrics platforms to automatically scale up and down the number of threads in threadpools.
3.
It's a CLI that allows you to modify the configuration of a running Spring Boot application without the need for restarting or downtime.
4.
It provides out-of-the-box functionality that integrates wiltr?third-party metrics platforms to automatically scale up and down the number of instances of the Spring Boot application.
Q 31 / 68
1.
It introspects the local machine and automatically provisions resources based on certain contextual configuration files.
2.
It automatically generates comments for annotated classes on autowired dependencies to provide additional context about dependencies.
3.
It defines metadata at the class-level to determine how to load or configure an ApplicationContext in Spring integration tests.
4.
It automatically generates JavaDocs for annotated classes to provide additional context about the purpose of the class.
Q 32 / 68
1.
Authentication is the act of granting access to specific resources and functions based on config settings. Authorization is the act of introspecting a user's credentials to ensure they are not impersonating another user.
2.
Authentication is the act of verifying certain resources and functions are actually valid. Authorization is the act of verifying a user's credentials have not expired.
3.
Authentication is the act of verifying that certain resources and functions actually exist in the database. Authorization is the act of verifying a user's credentials to ensure they are valid.
4.
Authentication is validating that users are who they claim to be. Authorization is granting access to specific resources and functions.
Q 33 / 68
1.
to create a ThreadLocal byte stream that allows a request to be encoded for reading directly into a database
2.
to automatically generate a ThreadLocal byte stream from the body of a request that allows a request to scanned for security risks
3.
to indicate whether an annotated handler method parameter should be bound to the web request body, which is converted by an HttpMessageConverter
4.
to automatically validate the characters contained in a request to ensure that they are a valid character encoding
Q 34 / 68
1.
The DispatcherServlet process daemon assigns a separate Web Servlet Container process to each HTTP request that comes into the web server.
2.
It is a servlet that dispatches HTTP requests to registered handlers/controllers for processing.
3.
The DispatcherServlet API assigns a separate Web Servlet Node process to each additional HTTP request that comes into the web server.
4.
It is a servlet that dispatches an array of background daemon processes that allocate memory and CPU cycles to each request.
Q 35 / 68
1.
It triggers a local automated review of configuration files such as web.xml and detects possible security issues or automatically resolves circular dependencies.
2.
It triggers an automated review of configuration by a web-based agent that reviews your existing web.xml file and detects possible security issues.
3.
It's an opinionated, intelligent method of introspecting an app to configure beans that are likely to be needed. This configuration can be overridden over time with manual configuration.
4.
It provides plug-in functionality while editing your web.xml and other config files that will autocomplete common dependencies while typing.
Q 36 / 68
1.
Add an @EnableJpaRepositories annotation to your configuration class and create a Spring Data Repository.
2.
Add an @EnableJpaEntities annotation to your configuration class, create a Spring Data YAML configuration file, and manually update the Spring XML config files to define your repository locations.
3.
Add an @EnableDbFunctionality annotation to your configuration class, create a Spring Data XML configuration file, and manually update the Spring factories file to define your repositories.
4.
Add an @InitJpaEntities annotation to your configuration class, create a Spring Data properties configuration file, and manually update the Spring startup parameters to define your repository locations.
Q 37 / 68
1.
a version-controlled schema change that is applied to a database
2.
a sequence of actions representing a single unit of work managed as a single operation that can be either committed or rolled back
3.
an encoded message and response between various shards of a database
4.
an exchange or interaction between various worker nodes in a multithreaded environment
Q 38 / 68
1.
multiclass
2.
aspect
3.
crosscut
4.
sidecut
Q 39 / 68
1.
any of these answers
2.
Annotate a Setter method with the @Autowired annotation.
3.
Specify parameters in the constructor with an optional @Autowired annotation.
4.
Use field injection.
Q 40 / 68
java my.property=Test java @Prop("${my.property}") private String val; java @GetVal("my.property") private String val; java @GetProperty("${my.property}") private String val; java @Value("${my.property}") private String val;
1.
A
2.
B
3.
C
4.
D
Q 41 / 68
1.
a managed dependency defined by configuration metadata that can be injected into downstream classes
2.
a binary-encoded, agnostic, named entity that is translatable between different data formats
3.
a payload that is transferable between different services in a Service-Oriented Architecture (SOA)
4.
a discrete piece of data that is encoded in a binary format for persisting to a file system
Q 42 / 68
1.
application properties located in an application.properties file outside the application.jar
2.
@PropertySource annotations on configuration classes
3.
profile-specific application-{profile}.properties files
4.
application properties located in an application.properties file inside the application.jar
Q 43 / 68
![Alt text](https://usaupload.com/cache/plugins/filepreviewer/69009/c5e6eedce33819dd3b16bff7590d244b0fedf52561323c444b4b63e19e61e2e8/1100x800_cropped.jpg 'Spring bean lifecycle')
1.
Persist bean definitions into a database
2.
Instance bean objects
3.
De-normalize bean definition
4.
Use reflection to inject bean objects into the servlet container
Q 44 / 68
1.
logging.settings
2.
log.level
3.
root.logger.level
4.
logging.level.root
Q 45 / 68
1.
an autogenerated UUID
2.
a unique String name
3.
an auto-incremented Integer ID
4.
an ID derived from its location in memory
Q 46 / 68
1.
Spring Boot can create a self-executable WAR file that runs without needing a servlet container. A JAR file has to be deployed to an existing web container such as Tomcat with separate files for dependencies.
2.
Spring Boot can create a JAR file that contains bytecode that interacts directly with the OS without needing a servlet container. A WAR file has to be deployed to an existing web container such as Tomcat with separate files for dependencies.
3.
The Spring Boot JAR file will be deployed to a Servlet container such as Tomcat on an existing running web server locally. The WAR file will be deployed to a cloud-based servlet container.
4.
Spring Boot can create a self-executable JAR file that contains all the dependencies and an embedded Servlet container. A WAR file has to be deployed to an existing web container such as Tomcat.
Q 47 / 68
1.
It ensures that transactions that are commited to the database are propagated to all the shards of a clustered database system.
2.
None of these answers is correct.
3.
It guarantees that transactions that are submitted to the database cluster are propagated to all the nodes of a clustered database cloud.
4.
It enforces that a logical transaction scope is created for each method that determines rollback-only status, with an outer transaction scope being logically independent from the inner transaction scope.
Q 48 / 68
java @Component public class Test implements InitializingBean { @Autowired ApplicationContext context; private TestService service; public void setService(TestService service) { this.service = service; } @Override public void afterPropertiesSet() throws Exception { System.out.print(context.containsBean("testService") + " "); System.out.println(service.getClass()); } } @Service class TestService {} Explanation: missing `@Autowired` on `private TestService service` or on the setter
1.
a null pointer stacktrace
2.
true null
3.
true package.TestService
4.
false package.TestService
Q 49 / 68
1.
@RequestMapping; WebRequest
2.
@Controller; URLFilter
3.
@WebFilter; ServletContextInitializer
4.
@Component; FilterRegistrationBean
Q 50 / 68
1. A predicate that matches join points. 2. A point during the execution of a program, such as the execution of a method or the handling of an exception. 3. An action taken by an aspect at a particular join point. 1. Pointcut 2. Advice 3. Join point 1. Join point 2. Pointcut 3. Advice 1. Advice 2. Pointcut 3. Join point 1. Pointcut 2. Join point 3. Advice
1.
1. Pointcut
2. Advice
3. Join point
2.
1. Join point
2. Pointcut
3. Advice
3.
1. Advice
2. Pointcut
3. Join point
4.
1. Pointcut
2. Join point
3. Advice
Q 51 / 68
Explanation: sha-1 is not considered secure anymore: https://en.wikipedia.org/wiki/SHA-1#Attacks . With bcrypt you can select more complex hashes https://en.wikipedia.org/wiki/Bcrypt
1.
Passwords should be hashed using an adaptive one-way function such as bcrypt.
2.
Passwords can be stored in a BASE64 encoded format if they are stored in a private database.
3.
Passwords should be salted and hashed using the MD5 algorithm.
4.
Passwords should be hashed using the SHA-1 algorithm, then salted to provide defence against rainbow table attacks.
Q 52 / 68
`@target(com.linkedin.annotation.Loggable)`
1.
any join point where the target object has a @Loggable annotation
2.
any join point where the executing method has a @Loggable annotation
3.
any method that implements Loggable
4.
any method that extends Loggable
Q 53 / 68
java @Component public class Test implements InitializingBean { @Autowired ApplicationContext context; @Autowired SimpleDateFormat formatter; @Override public void afterPropertiesSet() throws Exception { System.out.println(context.containsBean("formatter")); System.out.println(formatter.getClass()); } } @Configuration class TestConfig2 { @Bean public final SimpleDateFormat formatter() { return new SimpleDateFormat(); } }   class java.text.SimpleDateFormat <br />   SimpleDateFormat <br /> Explanation: `@Bean`-method in `@Configuration` must be overridable. Remove the `final` keyword to fix.
1.
true <br />
2.
true <br />
3.
a NullPointerException stacktrace
4.
a BeanDefinitionParsingException stacktrace
Q 54 / 68
1.
Configures a web application that is able to be deleted and re-created during runtime through hot swap. It adds a **recreateContext()** method and defines a root WebDaemon that must be bound to in the bootstrap process.
2.
It configures a Spring application that is able to be modified on the fly during runtime through bytecode re-encoding. Also it adds an **updateContext()** method and defines a root WebServlet that must be bound to in the bootstrap process.
3.
It provides configuration for a web application that is read-only while running. Also, it adds a **getServletContext()** method and defines an attribute name to which the root context must be bound in the bootstrap process.
4.
It provides configuration for a Spring application that is updatable on the fly during runtime through bytecode weaving. Also it adds an **updateServletContext()** method and defines a root servlet that must be bound to in the bootstrap process.
Q 55 / 68
1.
Aspect-Oriented Programming allows you to define different cross-cutting aspects that isolate beans to be available only in certain environments and profiles.
2.
Aspect-Oriented Programming enables you to perform profiling, which lets you develop different cross-cutting JVM performance-tuning profiles for different aspects of your applications.
3.
Aspect-Oriented Programming enables the modularization of cross-cutting concerns so that repeated boilerplate logic, such as logging code, does not pollute business logic.
4.
Aspect-Oriented Programming enables you to persist cross-cutting data across modularized shards of your database.
Q 56 / 68
1.
getPrincipal
2.
getUsername
3.
getUser
4.
getDn
Q 57 / 68
### Q59. What is the result of calling the map controller method using the following HTTP request? POST localhost:8080/map {"b" : "b", "d" : "d"} java @RestController public class SampleController { @RequestMapping("/map") public String map(@RequestBody SampleObject sampleObject) { return sampleObject.getB() + sampleObject.getC(); } } java public class SampleObject { String b; String c; public String getB() { return b; } public void setB() { this.b = b; } public String getC() { return c; } public void setC() { this.c = c; } }
1.
none of these answers
2.
bean type
3.
bean size
4.
bean name
5.
An InvalidRequestBodyException is thrown at runtime.
6.
A MissingPropertyException is thrown at runtime.
7.
The text "bnull" is returned in the response body.
8.
The text "a" is returned in th response body.
Q 58 / 68
java @SpringBootApplication public class Question14 { @Autowired private static Service service; public static void main(String[] args) { SpringApplication.run(Question14.class, args); } } @Component class Service {}
1.
The application will result in a compile error because you can't autowire a private variable.
2.
The application will compile and run, and service will have its dependency correctly injected by Spring.
3.
The application will compile and run, but service will not be autowired because you cannot autowire a static class member.
4.
The application will result in a compile error because you attempted to autowire a static variable.
Q 59 / 68
1.
The security context includes details of the principal currently using the app, which is stored by default in a `ThreadLocal` in an `Authentication` object.
2.
The security context holds a list of all users and their encrypted passwords in memory and a list of resources that users are able to access.
3.
The security context includes information about safe network IDs and IP addresses that are able to access the system.
4.
The security context includes information about permissions on the local file system describing how local file resources can be accessed.
Q 60 / 68
1.
Annotate a Controller class with `@Controller`. Then, using a specific naming convention for the methods, the `RequestMappingHandlerAdapter` will automatically configure your endpoints with the proper HTTP verb and URI.
2.
Register a controller as a bean. Then, using a specific naming convention for the methods, the `RequestMappingHandlerAdapter` will automatically configure your endpoints based on values from the YAML config file.
3.
Annotate a controller method with `@RequestMapping`, or a HTTP verb-specific annotation with a String URI pattern parameter (and other params as needed), which is supported through a `RequestMappingHandlerMapping/Adapter`.
4.
Register a controller as a bean. Then, using a specific naming convention for the methods, the RequestMappingHandlerAdapter will automatically configure your endpoints based on values passed into the bean definition.
Q 61 / 68
`execution(* setter*(..))`
1.
any method with a name that contains the String "setter" with a single parameter
2.
any method with a name that begins with String "setter" with a single parameter
3.
any method with a name that begins with String "setter"
4.
any method with a name that contains the String "setter"
Q 62 / 68
1.
Front Controller
2.
Facade
3.
Reactive Chain
4.
Observer
Q 63 / 68
`within(com.linkedin.service..*)`
1.
any join point only within the service package
2.
This is not valid Pointcut expression
3.
any method in a class that autowires a service bean
4.
any join point within the service package or one of its subpackages
Q 64 / 68
`/shutdown` Reason: By default, all the endpoints are enabled in Spring Boot Application except /shutdown; this is, naturally, part of the Actuator endpoints.
1.
The request would fail because the endpoint is disabled by default.
2.
The Spring Boot app would return a URL and a list of currently running processes, and ask you to confirm the shutdown command.
3.
The Spring Boot app would return a URL to confirm the shutdown command.
4.
The Spring Boot app would begin shutting down.
Q 65 / 68
1.
The context is present in a ThreadLocal so you can just call getSpringApplicationContextInstance() anywhere in a test to get the current context.
2.
Test classes can implement the ApplicationContextAware interface or autowire the ApplicationContext.
3.
The context is automatically injected in every test so you can just call getSpringApplicationContextInstance() anywhere in a test to get the current context.
4.
You can just add the parameter Context context to any method so that the context is automatically wired in.
Q 66 / 68
1.
FilePath
2.
MultipartFile
3.
File
4.
MvcFile
Q 67 / 68
java @GetMapping("api/v1/domain/resource/{id}") public Pojo getPojo(@PathVariable("id") String id) { return testService.getPojo(id); }
1.
This endpoint is designed to delete an object of the typetype Pojo with the passed in path variable
2.
This endpoint is designed to return JSON mapped to the object type Pojo with the passed in id.
3.
This endpoint returns the path variable that describes the Pojo's location within the container.
4.
This endpoint is designed to update an existing resource of the object type Pojo with the passed in id.
Q 68 / 68