When I click a detail button
I'll make detail content and data source.
Process
when I click that button
There should be data corresponding to it
we can see this going well
like this the detail data should be seleeted
like this.
Front
DetailContent.jsx
look at this
Detail.jsx
As you can see
Product.jsx
This file mean data store, You know If you got a data in this page,
We can't upload a data in detail page so We should fill data this page.
like this we can fill data.
Server
Controller.java
In this page we have to use @PathVariable annotation
Because when we pull the data for detail page in database
We don't know which number bring it out So
Through
@PathVariable("id") Integer ID
We can take a data Which matched the number.
front-url = server-url
should be same as you know
200 mean = good reception
result : data
We can figure out that this two url same through both of picture
Service.java
Integer ID = component ID
Mapper.java
Mapper.xml
Mapper.xml file
To be continue..
'Front > React' 카테고리의 다른 글
[React] React File Type List (0) | 2023.02.16 |
---|---|
[React] 리액트 input 박스 안에 데이터 넣는 방법 (0) | 2022.11.14 |
[React] SpringBoot + React 데이터 불러오는 방법 (0) | 2022.11.13 |
[React] 리엑트 useRef 사용 방법 (0) | 2022.11.11 |
[React] 리엑트 return () 줄맞춤의 중요성 (0) | 2022.11.03 |