OBTENEZ de l'angular.js fichiers net::ERR_ABORTED

J'ai besoin de votre aide pour savoir où est mon erreur. Je suis à l'aide de springboot(backend) x Angularjs(frontend). Je reçois un GET (angular.js) les fichiers de net::ERR_ABORTED quand vous essayez de charger localhost:8080. Je n'ai pas trouvé une erreur sur mon angularfiles. Donc, voici mes codes:

//for the springcontroller

@RestController
public class EmployeeController {

    @Autowired
    EmployeeService es;

    @RequestMapping(method=RequestMethod.GET,value="/employees")
    public List<Employee> getAllEmployees(){
        return es.getAllEmployees();
    }

    @RequestMapping(method=RequestMethod.GET,value="/employees/{name}")
    public Employee getEmployee(@PathVariable String name){
        return es.getEmployee(name);
    }

    @RequestMapping(method=RequestMethod.POST,value="/employees")
    public void addEmployee(@RequestBody Employee emp){
        es.addEmployee(emp);
    }

    @RequestMapping(method=RequestMethod.PUT,value="/employees/{name}")
    public void updateEmployee(@RequestBody Employee emp,@PathVariable String name){
        es.updateEmployee(emp,name);
    }

    @RequestMapping(method=RequestMethod.DELETE,value="/employees/{name}")
    public void deleteEmployee(@PathVariable String name){
        es.deleteEmployee(name);
    }
}

Pour mon app.js:

(function(){
    'use strict';
    var app = angular.module('myApp',['ngRoute','myApp.controller']);

    app.config(function($routeProvider) {
        $routeProvider
        .when('/', {
            templateUrl: 'index.html',
            controller: 'HomeController'
        });
    });

})();

Pour mon HomeController.js

var module = angular.module('myApp.controller',['myApp.service']);
module.controller('HomeController',['$scope','HomeService',
    function($scope,HomeService){
        $scope.EmpData = [];

        var onSuccess = function(response){
            $scope.EmpData = response.data;
        };

        var onError = function(error){
            console.log('Error fetching data...');
        };

        function getAllEmployees(){
            HomeService.getAllEmployees().then(onSuccess,onError)
        };
   } //end of function

]);

Pour mon HomeService.js

var module = angular.module('myApp.service',[]);
module.service('HomeService',['$http',function($http){
        function doFetchEmployees(){
            var response = $http.get("/employees");
            return response;
        };
        return{
           getAllEmployees : function(){
               return doFetchEmployees();
        }
    };

    }]);

Et, enfin, pour mon index.html

<html>
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <script src="src/main/resources/scripts/angular.min.js"></script>
    <script src ="src/main/resources/scripts/angular-route.min.js"></script>
    <script src="src/main/resources/app.js"></script>
    <script src = "src/main/resources/HomeController.js"></script>
    <script src ="src/main/resources/HomeService.js" ></script>
</head>
<body ng-app="myApp" ng-controller="HomeController">
    <h2>Home</h2>
    <br/>
    <a href="#/index.html">Home</a>
    <br/>
    <table>
    <thead>
    <tr>
        <th>Name</th>
        <th>Email</th>
        <th>Address</th>
        <th>telephone</th>
    </tr>
    </thead>
    <tbody ng-repeat="emp in EmpData">
        <tr>
        <td>{{emp.name}}</td>
        <td>{{emp.email}}</td>
        <td>{{emp.address}}</td>
        <td>{{emp.telephone}}</td>
        </tr>
    </tbody>
    </table>

    <br/>
    <a href="http://localhost:8080/adduser.html">Create User</a>
</body>
</html>

Et voici mon message d'erreur:

GET http://localhost:8080/src/main/resources/scripts/angular-route.min.js net::ERR_ABORTED
localhost/:7 GET http://localhost:8080/src/main/resources/app.js net::ERR_ABORTED
localhost/:5 GET http://localhost:8080/src/main/resources/scripts/angular.min.js net::ERR_ABORTED
localhost/:8 GET http://localhost:8080/src/main/resources/HomeController.js net::ERR_ABORTED
localhost/:9 GET http://localhost:8080/src/main/resources/HomeService.js net::ERR_ABORTED
localhost/:6 GET http://localhost:8080/src/main/resources/scripts/angular-route.min.js net::ERR_ABORTED
localhost/:7 GET http://localhost:8080/src/main/resources/app.js net::ERR_ABORTED
localhost/:8 GET http://localhost:8080/src/main/resources/HomeController.js net::ERR_ABORTED
localhost/:9 GET http://localhost:8080/src/main/resources/HomeService.js net::ERR_ABORTED

Mon index.html n'a pas de sortie d' {{emp.les noms}} -> comme cela.
J'ai déjà essayé de mettre les balises de script à l'intérieur du corps mais toujours le même. Dur de rechargement du cache & clair. toujours pas de chance.
Et Enfin, lorsque j'essaie d'accéder à localhost:8080 mon eclipse journaux de la console montre ces 3 lignes, est-ce aussi une cause de l'erreur?

2017-10-18 10:31:22.115  INFO 9176 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2017-10-18 10:31:22.115  INFO 9176 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2017-10-18 10:31:22.127  INFO 9176 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 12 ms

Je vais avoir un moment difficile essayer de comprendre cela.

entrez la description de l'image ici

S'il vous plaît montrer votre structure de projet pour le Backend et Frontend
j'ai ajouté l'image de la structure du projet, pouvez-vous voir maintenant?
Essayez de mettre tous vos fichiers statiques (css, js) sur le répertoire src/main/resources/static
toujours la même erreur. Comment puis-je envoyer ici mon projet si vous le désirez
En fait, je ne suis pas beaucoup d'expérience avec spring-boot, mais essayez de vérifier celui-ci: stackoverflow.com/a/22951140/5852226 j'espère que ça peut aider

OriginalL'auteur LogronJ | 2017-10-18