-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77ed55d
commit 57ccc28
Showing
1 changed file
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
## JTE Plugin for Severell | ||
## JTE Plugin for Severell | ||
|
||
### Installation | ||
|
||
Add the following dependency to your `pom.xml` | ||
|
||
``` | ||
<dependency> | ||
<groupId>com.severell.plugins</groupId> | ||
<artifactId>jte</artifactId> | ||
<version>0.0.2/version> | ||
</dependency> | ||
``` | ||
|
||
Then in your `providers.java` you'll need to add the `JteProvider.java`. The provider list should look something like this | ||
|
||
```java | ||
public static ServiceProvider[] load(Container c) { | ||
return new ServiceProvider[]{ | ||
new AppProvider(c), | ||
new JettyProvider(c), | ||
new SessionProvider(c), | ||
new ViewProvider(c), | ||
new JteProvider(c), | ||
new MailProvider(c), | ||
new RouteProvider(c), | ||
}; | ||
} | ||
``` | ||
Finally in your `.env` file you'll need to add the following variable. | ||
|
||
```text | ||
VIEW_DRIVER=Jte | ||
``` | ||
|
||
### Usage | ||
|
||
Now in your controller files you can render your Jte templates. | ||
|
||
```java | ||
resp.render("index.jte", new HashMap<String, Object>()); | ||
``` |