Include angular.js using maven in Java Spring project

1

I'm studying Spring Framework with Maven, in the insert dependencies part I'm having a bit of trouble trying to insert angular.js into the html page, in the pom.xml file, the angularjs dependency looks like this:

<dependency>
        <groupId>org.webjars</groupId>
        <artifactId>angularjs</artifactId>
        <version>1.4.4</version>
    </dependency>

There's no such thing as a bug, so I guess it's right.

In html I try to insert like this:

<head>
    <title>Home</title>
    <link rel="stylesheet" href="/META-INF/resources/webjars/angularjs/1.4.4/angular.js"/>

</head>

My main question is where is the Angularjs that is included in the project by Maven and how do I put the path to the js on the page?

Thank you.

    
asked by anonymous 15.09.2015 / 04:51

1 answer

2

Following the documentation ( link ), you should put this tag in the spring configuration file:

<mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>
    
15.09.2015 / 04:55