我正在尝试将spring boot与angular2集成在一起。 这是服务,它呈现存储在数据库中的摄像机列表
using namespace boost::math;
typename function_type; // this is probably wrong
function_type f // and this
{
return -x*x+1;
};
int main(int, char**)
{
const double val =
integral(0.0,
1,
0.001,
f); // my question is, what do I put in here? How do I format f.
}
我正在关注这个tuto,用spring boot后端构建angular2 app:https://www.youtube.com/watch?v=HhroyiYFmjc 这是angular2部分的一部分:
@RestController
@RequestMapping(value ="/cameras")
public class CameraController {
@Resource
private CameraService cameraService;
@RequestMapping(method = RequestMethod.GET)
public Collection<Camera> getAllCameras() {
return this.cameraService.getAllCameras();
}
通常它应该呈现存储在数据库中的摄像机列表,但它显示默认数组:cameras = [{id:“1”,name:“camera1”,place:“home”}];我无法调用后端服务:( 谢谢你的帮助:))