Skip to content

Commit 8db78af

Browse files
committed
Repository + Controller bug fixed
1 parent 23a288e commit 8db78af

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

bioMedical/src/main/java/com/spring/bioMedical/Controller/AdminController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,6 @@ public String appointments(Model model){
376376
model.addAttribute("app", list);
377377

378378

379-
return "admin/admin";
379+
return "admin/appointment";
380380
}
381381
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
package com.spring.bioMedical.repository;
22

3+
import java.util.List;
4+
35
import org.springframework.data.jpa.repository.JpaRepository;
46
import org.springframework.stereotype.Repository;
57

68
import com.spring.bioMedical.entity.Appointment;
9+
import com.spring.bioMedical.entity.User;
710

811
@Repository("appointmentRepository")
912
public interface AppointmentRepository extends JpaRepository<Appointment, Integer> {
1013

14+
15+
List<Appointment> findAll();
1116
}

bioMedical/src/main/resources/templates/admin/appointment.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@
150150
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
151151
<thead>
152152
<tr>
153+
<th>Id</th>
153154
<th>Name</th>
154155
<th>Email</th>
155156
<th>Date</th>
@@ -161,7 +162,8 @@
161162
</tr>
162163
</thead>
163164
<tfoot>
164-
<tr>
165+
<tr>
166+
<th>Id</th>
165167
<th>Name</th>
166168
<th>Email</th>
167169
<th>Date</th>
@@ -178,7 +180,7 @@
178180
<td th:text="${temp.id}" />
179181
<td th:text="${temp.name}" />
180182
<td th:text="${temp.email}"/>
181-
<td th:text="${temp.des}" />
183+
<td th:text="${temp.description}" />
182184
<td th:text="${temp.time}" />
183185
<td th:text="${temp.description}" />
184186
<td th:text="${temp.regtime}" />

0 commit comments

Comments
 (0)