Coding By Yakub
702 subscribers
273 photos
97 files
24 links
This channel for online classes videos for java , jdbc, hibernate, spring and spring boot and react js. With handson
Download Telegram
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<h1>Display All Student Details</h1>
<table border="2" width="70%" cellpadding="2">
<tr>
<th>Id</th>
<th>Name</th>
<th>Course</th>
<th>HTML</th>
<th>HIBERNATE</th>
<th>SPRING</th>
<th>SPRING BOOT</th>
<th>TOTAL</th>
<th>PERCENTAGE</th>
<th>GRADE</th>
<th>RESULT</th>
<th>EDIT</th>
<th>DELETE</th>
</tr>
<c:forEach var="student" items="${students}">
<tr>
<td>${student.sid}</td>
<td>${student.name}</td>
<td>${student.course}</td>
<td>${student.html}</td>
<td>${student.hibernate}</td>
<td>${student.spring}</td>
<td>${student.springboot}</td>
<td>${student.total}</td>
<td>${student.percentage}</td>
<td>${student.grade}</td>
<td>${student.result}</td>
<td><a href="/editUrl/$${student.sid}">Edit</a></td>
<td><a href="/deleteUrl/$${student.sid}">Delete</a></td>

</tr>
</c:forEach>
</table>
<a href="/stdregform">Add New Student</a>
</body>
Student Marks Results SpringBoot Appn.txt
9.9 KB
for Student Marks Results
CRUD with Mysql Data Base
=====================================
Required Files Are
================
1. Student.java --> @Entity+@Id
2. StudentRepo.java --> @Repository
3.StudentService.java (I)
public Student saveStudent(Student student);
public Student getOneStudent(int sid);
public void deleteStudent(int sid);
public List<Student> getAllStudent();
public Student updateStudent(Student student);
4. StudentServiceImp.java (c) --> @Service
5. StudentController.java --> (c) --> @Controller
6. application.properties --> portNoCode+ViewResolverCode+DB+JPA
7.Application.java --> @SpringBootApplication
eureka:
client:
registerWithEureka: true
fetchRegistry: true
service-url:
defaultZone: http://localhost:8761/eureka/
instance:
hostname: localhost
server:
port: 8000
spring:
application:
name: API-GATEWAY
cloud:
gateway:
routes:
- id: CITIZEN-SERVICE
uri:
lb://CITIZEN-SERVICE
predicates:
- Path=//citizen/**
- id: VACCINATION-CENTER-SERVICE
uri:
lb://VACCINATION-CENTER-SERVICE
predicates:
- Path=//vaccinationCenter/**
👍2
eureka: client:
registerWithEureka: true fetchRegistry: true
service-url: defaultZone: http://localhost:8761/eureka/
instance: hostname: localhost
server: port: 8000
spring: application:
name: API-GATEWAY cloud:
gateway: routes:
- id: CITIZEN-SERVICE uri:
lb://CITIZEN-SERVICE predicates:
- Path=/citizen-service/** - id: VACCINATION-CENTER-SERVICE
uri: lb://VACCINATION-CENTER-SERVICE
predicates: - Path=/vaccinationCenter/**
👍1
👍1
import { useRef,useState } from "react";
import axios from "axios";
const GetExp1=()=>{
const [arr,setArr]=useState([]);
const ref1=useRef(null);
const fetch_data=()=>{
getData();
}

const getData=async ()=>{
const res=await axios.get(`https://reqres.in/api/users?page=${ref1.current.value}`);
const {data:x}=res;
const {data}=x;
setArr(data);
}
return(
<>
<input type="number" ref={ref1}></input>
<button onClick={fetch_data}>GetData</button>
<br></br>
{
arr.length!=0?(<table border={1}
align="center"
cellSpacing={10}
cellPadding={10}>
<tr>
<th>id</th>
<th>first_name</th>
<th>last_name</th>
<th>email</th>
<th>avatar</th>
</tr>
{
arr.map((element,index)=>{
return(
<tr key={index}>
<td>{element.id}</td>
<td>{element.first_name}</td>
<td>{element.last_name}</td>
<td>{element.email}</td>
<td><img src={element.avatar}></img></td>
</tr>
)
})
}
</table>):(<i className="fa fa-spin fa-spinner"></i>)
}
</>
)
}
export default GetExp1;
1👍1