Skip to content

Commit 64fb94a

Browse files
committed
change the master
1 parent c7b538f commit 64fb94a

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

skill/src/main/java/jp/wicresoft/controller/SkillMasterController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public class SkillMasterController {
1515

1616
@RequestMapping(value="/skill")
1717
public String skillView(Model model) {
18+
model.addAttribute("skills", skillMasterImpl.skillView());
1819
model.addAttribute("page", "master");
1920

2021
return "skill_view";
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
11
package jp.wicresoft.impl;
22

3+
import java.util.List;
4+
5+
import org.springframework.beans.factory.annotation.Autowired;
36
import org.springframework.stereotype.Component;
47

8+
import jp.wicresoft.domain.SkillTitleMst;
9+
import jp.wicresoft.repository.SkillTitleMstRepository;
10+
511
@Component
612
public class SkillMasterImpl {
713

8-
public void skillView() {
9-
14+
@Autowired
15+
SkillTitleMstRepository skillTitleMstRepository;
16+
17+
public List<SkillTitleMst> skillView() {
18+
List<SkillTitleMst> stuffMetas = skillTitleMstRepository.findAll();
19+
return stuffMetas;
1020
}
1121
}

skill/src/main/resources/templates/skill_view.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ <h2 class="col-sm-offset-4 col-sm-8">スキル マスター</h2>
2121
<tr>
2222
<th>#</th>
2323
<th>スキル</th>
24-
<th>詳細情報</th>
24+
<!-- <th>詳細情報</th> -->
2525
<th>操作</th>
2626
</tr>
2727
</thead>
2828
<tbody>
2929
<tr class="openRow" th:each="skill,iterStat : ${skills}">
30-
<th th:text="${skill.id}"></th>
31-
<td th:text="${skill.name}"></td>
32-
<td><a th:href="@{skill_edit} + '/' + ${skill.id}">Edit</a></td>
30+
<th th:text="${skill.skillTitleId}"></th>
31+
<td th:text="${skill.titleName}"></td>
32+
<td><a th:href="@{skill_edit} + '/' + ${skill.skillTitleId}">Edit</a></td>
3333
</tr>
3434
</tbody>
3535
</table>

0 commit comments

Comments
 (0)