Commit 480f4a72 authored by Phạm Duy Phi's avatar Phạm Duy Phi

no message

parent 3c2108f5
package com.itsol.quantrivanphong.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import org.springframework.web.servlet.view.InternalResourceViewResolver;
@EnableWebMvc
@Configuration
@ComponentScan("com.itsol.quantrivanphong")
public class WebConfig implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/resources/public/js/**")
.addResourceLocations("/resources/public/js/");
registry.addResourceHandler("/resources/public/css/**")
.addResourceLocations("/resources/public/css/");
registry.addResourceHandler("/resources/public/page/**")
.addResourceLocations("/resources/public/page/");
}
@Bean
public ViewResolver getViewResolver(){
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/jsp/");
resolver.setSuffix(".jsp");
return resolver;
}
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
configurer.enable();
}
}
...@@ -11,8 +11,9 @@ angular.module("MyTimeSheet",[]).controller("timesheetController", function($sco ...@@ -11,8 +11,9 @@ angular.module("MyTimeSheet",[]).controller("timesheetController", function($sco
}; };
$http({ $http({
header : 'Access-Control-Allow-Origin: http://localhost:63342/MockProject_01/public/pages/timesheet/timesheet.html?_ijt=ee540pqfq7tplkmo9mjj447ne',
method : 'GET', method : 'GET',
url : "http://localhost:8080/eproject/{employee_Id}/timesheet", url : "http://localhost:8080/eproject/timesheet",
}).then(function successCallback(response) { }).then(function successCallback(response) {
console.log(response) console.log(response)
$scope.timesheet=response.data; $scope.timesheet=response.data;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment