Q:

Different between Autowired Services and Objects Spring MVC

I was wondering what is the difference between creating a new class and injecting it with the @Autowired annotation and creating a class and take the object of this class and using its methods. Is there any techical reason(i.e. faster access etc)?
Service case:
 @Service
 public class AuthorService implements AuthorServiceInterface {

   //some methods
 }

Simple Class case:
 public class AuthorService implements AuthorServiceInterface {

   //some methods
 }

If i want to call the first one in another class i have to write:
public Class myclass{

    @Autowired
    AuthorService authorservice;

} 

In the second case i have to write:
public Class myclass{

    AuthorService authorservice = new AuthorService():

} 

Whats the difference between these two cases?

A:

The first snippet uses dependency injection, and the second doesn't. Dependency injection allows

decoupling MyClass from the concrete implementation of AuthorService which would allow switching implementations depending on the environment for example
using a singleton (or session-scoped or request-scope) AuthorService rather than reinstantiating one each time
injecting a mock AuthorService implementation when unit-testing MayClass
injecting a proxy around the concrete AuthorService instance, which could

verify authorizations
start a transaction before each method call and commit/rollback it after the method call
log the method calls
measure the time taken by methods and compute statistics
invoke an AuthorService on another machine, using RMI or HttpInvoker 
...

Note that you should autowire AuthorServiceInterface, and not AuthorService, in MyClass.

