Javascript Spring MVC+;角度路由提供404

Javascript Spring MVC+;角度路由提供404,javascript,angularjs,spring,spring-mvc,Javascript,Angularjs,Spring,Spring Mvc,我已经创建了一个SpringMVC项目和一个客户端应用程序 对于angular应用程序, 以下是/webapp/resources/js/app.js文件的内容 'use strict'; // Declare app level module which depends on views, and components var app = angular.module('myApp', [ 'ngRoute', 'ngMaterial', 'rzModule'

我已经创建了一个SpringMVC项目和一个客户端应用程序

对于angular应用程序, 以下是/webapp/resources/js/app.js文件的内容

    'use strict';

// Declare app level module which depends on views, and components
var app = angular.module('myApp', [
  'ngRoute',
    'ngMaterial',
    'rzModule'

]);

app.config(function ($routeProvider) {
  $routeProvider
      .when('/views/1', {
        controller: 'MyController',
        templateUrl: '/views/view1.html'
      })
      .when('/views/2', {
          controller: 'MyController',
          templateUrl: '/views/view2.html'
      })
      .when('/views/file-upload', {
          controller: 'MyController',
          templateUrl: '/views/file-upload.html'
      })
      .otherwise({
        redirectTo: '/'
      });
});
但是像“templateUrl:'/views/file upload.html'”这样的给定模板URL似乎不起作用

视图位于/webapp/WEB-INF/views文件夹中


我想知道为了在app.js中路由此视图,我应该提供哪些地址

您有控制台错误吗?它可能指向正确的方向。您有控制台错误吗?它可能指向正确的方向。