Skip to content

Commit 67d6255

Browse files
committed
server de conf + health check
1 parent a5680de commit 67d6255

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@
88
* The specification and mockups are in document folder.
99

1010
## Run the application
11+
12+
By default the server will be reachable on [http://localhost:8080](http://localhost:8080).
13+
1114
```
1215
grails war
1316
cd build/libs # see https://github.com/grails/grails-core/issues/9302
14-
java "-Dgrails.env=dev" -jar .\build\libs\TaskOverflow-0.1.war
15-
```
17+
java "-Dgrails.env=dev" -jar .\TaskOverflow-0.1.war
18+
```
19+
20+
## Health check
21+
Health check is available at [http://localhost:8080/health](http://localhost:8080/health).

grails-app/conf/application.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ grails.plugin.springsecurity.controllerAnnotations.staticRules = [
1010
[pattern: '/', access: ['permitAll']],
1111
[pattern: '/error', access: ['permitAll']],
1212
[pattern: '/index', access: ['permitAll']],
13+
[pattern: '/health', access: ['permitAll']],
1314
[pattern: '/question/**', access: ['permitAll']],
1415
[pattern: '/tag/**', access: ['permitAll']],
1516
[pattern: '/badge/**', access: ['permitAll']],

grails-app/conf/application.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@ spring:
2020

2121
# Spring Actuator Endpoints are Disabled by Default
2222
endpoints:
23-
enabled: false
23+
enabled: true
2424
jmx:
2525
enabled: true
26+
health:
27+
sensitive: false
2628

2729
---
2830
grails:
@@ -81,6 +83,8 @@ grails:
8183
endpoints:
8284
jmx:
8385
unique-names: true
86+
health:
87+
sensitive: false
8488

8589
---
8690
hibernate:

grails-app/controllers/taskoverflow/UrlMappings.groovy

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ class UrlMappings {
99
}
1010
}
1111

12+
13+
1214
"/login/$action?"(controller: "login")
1315
"/logout/$action?"(controller: "logout")
1416
"/"(controller: "question", action:"index")

0 commit comments

Comments
 (0)