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

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

失?。喝鄙俦匦璧恼?qǐng)求正文:public springframework.http.

失?。喝鄙俦匦璧恼?qǐng)求正文:public springframework.http.

米琪卡哇伊 2024-01-25 23:02:05
我已經(jīng)從 Web 創(chuàng)建了基于應(yīng)用程序的示例:Angular 中的前端和 Spring Boot 的后端(mer 客戶) Angular URL:http://localhost:4200/ Spring Boot URL:http://localhost:9020/(REST:http:// /本地主機(jī):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貢獻(xiàn)1862條經(jīng)驗(yàn) 獲得超7個(gè)贊

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



查看完整回答
反對(duì) 回復(fù) 2024-01-25
  • 1 回答
  • 0 關(guān)注
  • 169 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)