Skip to content

Commit 6bc3044

Browse files
committed
Tabs to Spaces
1 parent f0d6605 commit 6bc3044

File tree

4 files changed

+40
-40
lines changed

4 files changed

+40
-40
lines changed

_posts/2015-03-17-getting-started.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,45 +21,45 @@ public class BasicApplication extends Application {
2121

2222
@Override
2323
protected void onInit() {
24-
// send 'Hello World' as response
24+
// send 'Hello World' as response
2525
GET("/", routeContext -> routeContext.send("Hello World"));
2626

27-
// send a file as response
27+
// send a file as response
2828
GET("/file", routeContext -> routeContext.send(new File("pom.xml"));
2929

3030
// send a json as response
3131
GET("/json", routeContext -> {
32-
Contact contact = createContact();
33-
routeContext.json().send(contact);
32+
Contact contact = createContact();
33+
routeContext.json().send(contact);
3434
});
3535

3636
// send xml as response
3737
GET("/xml", routeContext -> {
38-
Contact contact = createContact();
39-
routeContext.xml().send(contact);
38+
Contact contact = createContact();
39+
routeContext.xml().send(contact);
4040
});
4141

4242
// send an object and negotiate the Response content-type, default to XML
4343
GET("/negotiate", routeContext -> {
4444
Contact contact = createContact();
45-
routeContext.xml().negotiateContentType().send(contact);
45+
routeContext.xml().negotiateContentType().send(contact);
4646
});
4747

4848
// send a template as response
4949
GET("/template", routeContext -> {
50-
routeContext.setLocal("greeting", "Hello");
51-
routeContext.render("hello");
52-
});
50+
routeContext.setLocal("greeting", "Hello");
51+
routeContext.render("hello");
52+
});
5353
}
5454

55-
private Contact createContact() {
56-
return new Contact()
57-
.setId(12345)
58-
.setName("John")
59-
.setPhone("0733434435")
60-
.setAddress("Sunflower Street, No. 6");
61-
}
62-
55+
private Contact createContact() {
56+
return new Contact()
57+
.setId(12345)
58+
.setName("John")
59+
.setPhone("0733434435")
60+
.setAddress("Sunflower Street, No. 6");
61+
}
62+
6363
}
6464
```
6565

@@ -114,8 +114,8 @@ public class ContactsController extends Controller {
114114
115115
@GET("/?")
116116
public void index() {
117-
List<Contact> contacts = contactService.getContacts();
118-
getResponse().bind("contacts", contacts).render("contacts");
117+
List<Contact> contacts = contactService.getContacts();
118+
getResponse().bind("contacts", contacts).render("contacts");
119119
}
120120
121121
@GET("/{id: [0-9]+}")

_posts/2015-03-17-static-files.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ If you want to have more control over webjars artifact version you can use this
7070

7171
```html
7272
<head>
73-
<link href="${webjarsAt('bootstrap/3.3.1/css/bootstrap.min.css')}" rel="stylesheet">
74-
<link href="${webjarsAt('font-awesome/4.2.0/css/font-awesome.min.css')}" rel="stylesheet">
73+
<link href="${webjarsAt('bootstrap/3.3.1/css/bootstrap.min.css')}" rel="stylesheet">
74+
<link href="${webjarsAt('font-awesome/4.2.0/css/font-awesome.min.css')}" rel="stylesheet">
7575
</head>
7676
```
7777

@@ -80,15 +80,15 @@ Sure in your pom.xml file (if you use Maven) you must declare the dependencies t
8080
```xml
8181
<!-- Webjars -->
8282
<dependency>
83-
<groupId>org.webjars</groupId>
84-
<artifactId>bootstrap</artifactId>
85-
<version>3.3.1</version>
83+
<groupId>org.webjars</groupId>
84+
<artifactId>bootstrap</artifactId>
85+
<version>3.3.1</version>
8686
</dependency>
8787

8888
<dependency>
89-
<groupId>org.webjars</groupId>
90-
<artifactId>font-awesome</artifactId>
91-
<version>4.2.0</version>
89+
<groupId>org.webjars</groupId>
90+
<artifactId>font-awesome</artifactId>
91+
<version>4.2.0</version>
9292
</dependency>
9393
```
9494

_posts/2015-03-17-templates.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ To use one of these template engines just add a dependency in your project:
2626

2727
```
2828
<dependency>
29-
<groupId>ro.pippo</groupId>
30-
<artifactId>pippo-freemarker</artifactId>
31-
<version>${pippo.version}</version>
29+
<groupId>ro.pippo</groupId>
30+
<artifactId>pippo-freemarker</artifactId>
31+
<version>${pippo.version}</version>
3232
</dependency>
3333
```
3434

@@ -55,8 +55,8 @@ So, maybe the shortest version is:
5555

5656
```java
5757
GET("/contact/{id}", routeContext -> {
58-
routeContext.setLocal("id", routeContext.getParameter("id").toInt(0));
59-
routeContext.setLocal("action", routeContext.getParameter("action").toString("new"));
58+
routeContext.setLocal("id", routeContext.getParameter("id").toInt(0));
59+
routeContext.setLocal("action", routeContext.getParameter("action").toString("new"));
6060
routeContext.render("contact");
6161
});
6262
```

_posts/2015-06-18-filters.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ For example we can create an `AuditFilter` (a __before filter__) with this code:
1313
```java
1414
// audit filter
1515
ALL("/.*", routeContext -> {
16-
log.info("Request for {} '{}'", routeContext.getRequestMethod(), routeContext.getRequestUri());
17-
routeContext.next();
16+
log.info("Request for {} '{}'", routeContext.getRequestMethod(), routeContext.getRequestUri());
17+
routeContext.next();
1818
});
1919
```
2020

@@ -28,11 +28,11 @@ Another __before filter__ can be an `AuthenticationFilter`:
2828
```java
2929
// authentication filter
3030
GET("/contact.*", routeContext {
31-
if (routeContext.getSession("username") == null) {
32-
routeContext.redirect("/login");
33-
} else {
34-
routeContext.next();
35-
}
31+
if (routeContext.getSession("username") == null) {
32+
routeContext.redirect("/login");
33+
} else {
34+
routeContext.next();
35+
}
3636
});
3737
```
3838

0 commit comments

Comments
 (0)