第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

失敗:缺少必需的請求正文:public springframework.http.

失?。喝鄙俦匦璧恼埱笳模簆ublic springframework.http.

米琪卡哇伊 2024-01-25 23:02:05
我已經從 Web 創(chuàng)建了基于應用程序的示例:Angular 中的前端和 Spring Boot 的后端(mer 客戶) Angular URL:http://localhost:4200/ Spring Boot URL:http://localhost:9020/(REST:http:// /本地主機:9020/api/ )<h1>Angular Part </h1>`export class Customer {    id: number;    firstname: number;    lastname: Number;    age: number;    active: boolean;}`和import { Customer } from './customer';    export class CustomerService {      private baseUrl = http://localhost:9020/api';      constructor(private http: HttpClient) { }     getCustomer(id: number): Observable<Object> {        return this.http.get(${this.baseUrl}+`/customers`+/${id});}      createCustomer(customer: Customer): Observable<Object> {        console.log("customer.lastname: "+customer.lastname);        console.log("customer.firstname: "+customer.firstname);        return this.http.post(${this.baseUrl} + `/create`, customer);      }      getCustomersList(): Observable<any> {        return this.http.get(${this.baseUrl}+`/customers`);      }    }    import { Component, OnInit } from '@angular/core';    import { Customer } from '../customer';    import { CustomerService } from '../customer.service';`    @Component({      selector: 'create-customer',      templateUrl: './create-customer.component.html',      styleUrls: ['./create-customer.component.css']    })    export class CreateCustomerComponent implements OnInit {      customer: Customer = new Customer();      submitted = false;      constructor(private customerService: CustomerService) { }      ngOnInit() {      }      newCustomer(): void {        this.submitted = false;        this.customer = new Customer();      }      save() {        this.customerService.createCustomer(this.customer)          .subscribe(data => {console.log(data);            this.submitted = true;},error => console.log(error));            this.customer = new Customer();}      onSubmit() {           this.save();}}
查看完整描述

1 回答

?
牧羊人nacy

TA貢獻1862條經驗 獲得超7個贊

在Entity類中,該列名為“first_name”,但是當您創(chuàng)建表時,它以“firstname”命名,下劃線消失了。



查看完整回答
反對 回復 2024-01-25
  • 1 回答
  • 0 關注
  • 148 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號