Skip to content

Commit

Permalink
Use spring-configuration-metadata.json generated by spring boot confi…
Browse files Browse the repository at this point in the history
…guration processor instead of manually creating it
  • Loading branch information
genuss committed Dec 22, 2024
1 parent 190ced3 commit 43d7c21
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 78 deletions.
5 changes: 5 additions & 0 deletions jte-spring-boot-starter-2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,25 @@

@ConfigurationProperties(prefix = "gg.jte")
public class JteProperties {
/**
* You can precompile the templates for faster startup and rendering. To use this you need to include
* the Maven or Gradle Plugin: <a href="https://jte.gg/pre-compiling/">https://jte.gg/pre-compiling/</a>
*/
private Boolean usePrecompiledTemplates = false;

/**
* You can change the location where jte expects the templates to compile
*/
private String templateLocation = "src/main/jte";

/**
* You can configure the file suffix of jte templates the compiler resolves
*/
private String templateSuffix = ".jte";

/**
* Set whether all request attributes should be added to the model prior to merging with the template
*/
private boolean exposeRequestAttributes = false;

public String getTemplateSuffix() {
Expand Down

This file was deleted.

5 changes: 5 additions & 0 deletions jte-spring-boot-starter-3/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,31 @@

@ConfigurationProperties(prefix = "gg.jte")
public class JteProperties {

/**
* You can precompile the templates for faster startup and rendering. To use this you need to include
* the Maven or Gradle Plugin: <a href="https://jte.gg/pre-compiling/">https://jte.gg/pre-compiling/</a>
*/
private boolean usePrecompiledTemplates = false;

/**
* You can enable development mode so that the jte file watcher will watch for changes in templates and recompile them.
*/
private boolean developmentMode = false;

/**
* You can change the location where jte expects the templates to compile
*/
private String templateLocation = "src/main/jte";

/**
* You can configure the file suffix of jte templates the compiler resolves
*/
private String templateSuffix = ".jte";

/**
* Set whether all request attributes should be added to the model prior to merging with the template
*/
private boolean exposeRequestAttributes = false;

public String getTemplateSuffix() {
Expand Down

This file was deleted.

0 comments on commit 43d7c21

Please sign in to comment.