Full-stack dev quiz question #42

Full-stack dev quiz question #42

quiz

To fully use Spring, you have to understand how it works. Can you answer a question about services' scope? Fortieth second question of the quiz checks it.

 

 

 

You have the following service:

 @Service
public class LicensingService {

   
public License getLicense(Long appId) {
        ...
    }

}

How many instances will exist in the running web application? Choose the best answer.

  1. one for each request,
  2. one for each session,
  3. one for the Spring container,
  4. one for the whole application cluster

For the correct answer scroll down

.

.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

.

.

.

The correct answer is: d.

If you like what I do, consider buying me a coffee :)

Buy me a coffeeBuy me a coffee