Question: I am using this tree grid directive [github.com](https://github.com/khan4019/tree-grid-directive/), and below css is taken directly from this library.

```
.tree-grid .level-2 .indented {
    position : relative;
    left     : 20px;
}

<td><a ng-click="user_clicks_branch(row.branch)"><i ng-class="row.tree_icon" ng-click="row.branch.expanded = !row.branch.expanded" class="indented tree-icon"></i></a><span class="indented tree-label tree-grid-row level-2>
             Citi Corporate and Investment Banking</span>
            </td>

```

The problem i am having is that span inside td is overflow and showing in the next column, for that purpose i need to add right:20px, but it is not working.

Is there any solution to this problem
[plnkr.co](http://plnkr.co/edit/XHzJgtJvuVAmkKn5vgPd?p=preview)

Answer: 
All beans in Spring are Singleton by default. This includes any `@Controller`, `@Service`, `@Repository` and others, as well as any xml defined bean. 

You could read [this](https://stackoverflow.com/questions/31629993/is-spring-default-scope-singleton-or-not) and [this](https://stackoverflow.com/questions/21828664/why-spring-bean-is-singleton-scope) 

From [Java basic variable tutorial](https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html): 

> 
> **Local Variables** Similar to how an object stores its state in fields, a
>  method will often store its temporary state in local variables. The
>  syntax for declaring a local variable is similar to declaring a field
>  (for example, int count = 0;). There is no special keyword designating
>  a variable as local; that determination comes entirely from the
>  location in which the variable is declared — which is between the
>  opening and closing braces of a method. As such, local variables are
>  only visible to the methods in which they are declared; they are not
>  accessible from the rest of the class.
> 
> 
>
That's why you need to use `@Autowired` when you declare a dependent service. Effectively handing the initialization process to the Spring framework instead of instantiating it yourself. Since Spring only has stateless beans, you're injecting one stateless singleton to another stateless singleton, so there's no need to manage thread manually.