Skip to content

Commit b4f05c7

Browse files
committed
Move default config to a file and improve doc for default config
1 parent 0f3e594 commit b4f05c7

26 files changed

Lines changed: 498 additions & 161 deletions

File tree

coverage-report/src/test/java/org/jooby/ErrDefaultHandlerFeature.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ public void err() throws Exception {
3838
"<h1>Bad Request</h1>\n" +
3939
"<hr><h2>message: intentional err</h2>\n" +
4040
"<h2>status: 400</h2>\n" +
41-
"<h2>referer: </h2>\n" +
4241
"<h2>stack:</h2>\n"
4342
);
4443
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package org.jooby;
2+
3+
import java.io.File;
4+
import java.nio.file.Paths;
5+
6+
import org.jooby.test.ServerFeature;
7+
import org.junit.Test;
8+
9+
import com.typesafe.config.Config;
10+
11+
public class NormalizedTmpdirFeature extends ServerFeature {
12+
13+
{
14+
get("/tmpdir", req ->
15+
req.require(Config.class).getString("application.tmpdir"));
16+
}
17+
18+
@Test
19+
public void tmpdir() throws Exception {
20+
String tmpdir = Paths.get(System.getProperty("java.io.tmpdir") + File.separator,
21+
getClass().getSimpleName()).normalize().toString();
22+
request()
23+
.get("/tmpdir")
24+
.expect(tmpdir);
25+
}
26+
27+
}

jooby-camel/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Using the ```doWith(Configurer)``` method:
138138

139139
That's all folks! Enjoy it!!!
140140

141-
## appendix: camel.conf
141+
# appendix: camel.conf
142142
```properties
143143
# Camel defaults
144144
camel.handleFault = false
@@ -176,3 +176,4 @@ camel.streamCaching.spoolDirectory = ${application.tmpdir}${file.separator}"came
176176

177177
```
178178

179+

jooby-ftl/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ See [CacheBuilderSpec](http://docs.guava-libraries.googlecode.com/git/javadoc/co
100100
101101
That's all folks! Enjoy it!!!
102102

103-
## appendix: freemarker.conf
103+
# appendix: freemarker.conf
104104
```properties
105105
#freemarker defaults
106106

@@ -124,3 +124,4 @@ freemarker.cache = "maximumSize=100"
124124
```
125125

126126

127+

jooby-hbm/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
## usage
1313

1414

15-
## appendix: hbm.conf
15+
# appendix: hbm.conf
1616
```properties
1717
hibernate {
1818
id.new_generator_mappings = true
@@ -25,3 +25,4 @@ javax.persistence {
2525

2626
```
2727

28+

jooby-jdbc/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ Finally, if you need to inject the audit data source, all you have to do is to u
156156

157157
That's all folks! Enjoy it!!!
158158

159-
## appendix: jdbc.conf
159+
# appendix: jdbc.conf
160160
```properties
161161
# Jdbc defaults
162162

@@ -288,3 +288,4 @@ databases {
288288

289289
```
290290

291+

jooby-jedis/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ That's all folks! Enjoy it!
131131

132132
TBD: Object mapping? https://github.com/xetorthio/johm?
133133

134-
## appendix: jedis.conf
134+
# appendix: jedis.conf
135135
```properties
136136
# jedis default config
137137

@@ -162,3 +162,4 @@ jedis.session.timeout = ${session.timeout}
162162

163163
```
164164

165+

jooby-jetty/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In order to use a web server all you have to do is add the dependency to your bu
1818
[Jooby](/) will found the server and start it.
1919

2020

21-
## appendix: server.conf
21+
# appendix: server.conf
2222
```properties
2323
# jetty defaults
2424
server.module = org.jooby.jetty.Jetty
@@ -104,3 +104,4 @@ jetty {
104104

105105
```
106106

107+

jooby-netty/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ In order to use a web server all you have to do is add the dependency to your bu
1818
[Jooby](/) will found the server and start it.
1919

2020

21-
## appendix: server.conf
21+
# appendix: server.conf
2222
```properties
2323
# netty defaults
2424
server.module = org.jooby.netty.Netty
@@ -63,3 +63,4 @@ netty {
6363

6464
```
6565

66+

jooby-quartz/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ Example 3: build and set everything from scratch
224224

225225
That's all folks! Enjoy it!!
226226

227-
## appendix: quartz.conf
227+
# appendix: quartz.conf
228228
```properties
229229
org.quartz.scheduler.instanceName = quartz
230230
org.quartz.scheduler.instanceId = local
@@ -235,3 +235,4 @@ org.quartz.threadPool.threadCount = ${runtime.processors}
235235

236236
```
237237

238+

0 commit comments

Comments
 (0)