Skip to content

Commit f892709

Browse files
committed
updates for Spring Boot 2.6.0 - info application.properties
1 parent cef0770 commit f892709

File tree

4 files changed

+58
-43
lines changed
  • 09-spring-boot/03-actuator-demo
  • 14-spring-boot-thymeleaf
    • bonus-thymeleafdemo-employees-security-with-in-memory-authentication/src/main/resources/templates/employees
    • bonus-thymeleafdemo-employees-security-with-jdbc-authentication/src/main/resources/templates/employees

4 files changed

+58
-43
lines changed

09-spring-boot/03-actuator-demo/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<parent>
1515
<groupId>org.springframework.boot</groupId>
1616
<artifactId>spring-boot-starter-parent</artifactId>
17-
<version>2.1.2.RELEASE</version>
17+
<version>2.6.0</version>
1818
<relativePath/> <!-- lookup parent from repository -->
1919
</parent>
2020

09-spring-boot/03-actuator-demo/src/main/resources/application.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
management.endpoints.web.exposure.include=health,info
2+
management.info.env.enabled=true
3+
14
info.app.name=My Super Cool App
25
info.app.description=A crazy fun app, yoohoo!
36
info.app.version=1.0.0

14-spring-boot-thymeleaf/bonus-thymeleafdemo-employees-security-with-in-memory-authentication/src/main/resources/templates/employees/list-employees.html

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ <h3>Employee Directory</h3>
4646
<th>First Name</th>
4747
<th>Last Name</th>
4848
<th>Email</th>
49-
<th>Action</th>
49+
50+
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
51+
<th>Action</th>
52+
</div>
5053
</tr>
5154
</thead>
5255

@@ -56,30 +59,33 @@ <h3>Employee Directory</h3>
5659
<td th:text="${tempEmployee.firstName}" />
5760
<td th:text="${tempEmployee.lastName}" />
5861
<td th:text="${tempEmployee.email}" />
59-
60-
<td>
61-
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
6262

63-
<!-- Add "update" button/link -->
64-
<a th:href="@{/employees/showFormForUpdate(employeeId=${tempEmployee.id})}"
65-
class="btn btn-info btn-sm">
66-
Update
67-
</a>
68-
69-
</div>
63+
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
7064

71-
<div sec:authorize="hasRole('ROLE_ADMIN')">
65+
<td>
66+
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
67+
68+
<!-- Add "update" button/link -->
69+
<a th:href="@{/employees/showFormForUpdate(employeeId=${tempEmployee.id})}"
70+
class="btn btn-info btn-sm">
71+
Update
72+
</a>
73+
74+
</div>
7275

73-
<!-- Add "delete" button/link -->
74-
<a th:href="@{/employees/delete(employeeId=${tempEmployee.id})}"
75-
class="btn btn-danger btn-sm"
76-
onclick="if (!(confirm('Are you sure you want to delete this employee?'))) return false">
77-
Delete
78-
</a>
76+
<div sec:authorize="hasRole('ROLE_ADMIN')">
77+
78+
<!-- Add "delete" button/link -->
79+
<a th:href="@{/employees/delete(employeeId=${tempEmployee.id})}"
80+
class="btn btn-danger btn-sm"
81+
onclick="if (!(confirm('Are you sure you want to delete this employee?'))) return false">
82+
Delete
83+
</a>
84+
85+
</div>
86+
</td>
7987

80-
</div>
81-
</td>
82-
88+
</div>
8389

8490
</tr>
8591
</tbody>

14-spring-boot-thymeleaf/bonus-thymeleafdemo-employees-security-with-jdbc-authentication/src/main/resources/templates/employees/list-employees.html

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,10 @@ <h3>Employee Directory</h3>
4646
<th>First Name</th>
4747
<th>Last Name</th>
4848
<th>Email</th>
49-
<th>Action</th>
49+
50+
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
51+
<th>Action</th>
52+
</div>
5053
</tr>
5154
</thead>
5255

@@ -56,30 +59,33 @@ <h3>Employee Directory</h3>
5659
<td th:text="${tempEmployee.firstName}" />
5760
<td th:text="${tempEmployee.lastName}" />
5861
<td th:text="${tempEmployee.email}" />
59-
60-
<td>
61-
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
6262

63-
<!-- Add "update" button/link -->
64-
<a th:href="@{/employees/showFormForUpdate(employeeId=${tempEmployee.id})}"
65-
class="btn btn-info btn-sm">
66-
Update
67-
</a>
68-
69-
</div>
63+
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
7064

71-
<div sec:authorize="hasRole('ROLE_ADMIN')">
65+
<td>
66+
<div sec:authorize="hasAnyRole('ROLE_MANAGER', 'ROLE_ADMIN')">
67+
68+
<!-- Add "update" button/link -->
69+
<a th:href="@{/employees/showFormForUpdate(employeeId=${tempEmployee.id})}"
70+
class="btn btn-info btn-sm">
71+
Update
72+
</a>
73+
74+
</div>
7275

73-
<!-- Add "delete" button/link -->
74-
<a th:href="@{/employees/delete(employeeId=${tempEmployee.id})}"
75-
class="btn btn-danger btn-sm"
76-
onclick="if (!(confirm('Are you sure you want to delete this employee?'))) return false">
77-
Delete
78-
</a>
76+
<div sec:authorize="hasRole('ROLE_ADMIN')">
77+
78+
<!-- Add "delete" button/link -->
79+
<a th:href="@{/employees/delete(employeeId=${tempEmployee.id})}"
80+
class="btn btn-danger btn-sm"
81+
onclick="if (!(confirm('Are you sure you want to delete this employee?'))) return false">
82+
Delete
83+
</a>
84+
85+
</div>
86+
</td>
7987

80-
</div>
81-
</td>
82-
88+
</div>
8389

8490
</tr>
8591
</tbody>

0 commit comments

Comments
 (0)