Spring MVC - Share Data
<p>I'm new to Spring and I've been using Spring boot with Freemarker template to buld a simple blog application. In my application I have a navbar.ftl which is shared by all other views.
In this nav bar I want to access a list of all Authors in order to show their names in a drop down (code below), but I'm not sure how to access it here, since this navbar is shared between all views.</p>

<pre><code>    &lt;li class="dropdown"&gt;
      &lt;a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"&gt;Authors &lt;span class="caret"&gt;&lt;/span&gt;&lt;/a&gt;
      &lt;ul class="dropdown-menu"&gt;
        &lt;#--Need to list all authors here. How???--&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
</code></pre>

<p>I have an AuthorRepository where I can find all authors, but I'm not sure how to use it in my view (I don't think the view could access the model directly anyway).</p>

<pre><code>@Repository
public interface AuthorRepository extends CrudRepository&lt;Author, Long&gt; {
}
</code></pre>

<p>Any idea how I could have a list of authors in this navbar so I can show their names?</p>