diff --git a/web/querydsl/pom.xml b/web/querydsl/pom.xml index 68edf2d8..5f18d1d2 100644 --- a/web/querydsl/pom.xml +++ b/web/querydsl/pom.xml @@ -43,6 +43,12 @@ runtime + + io.github.jpenren + thymeleaf-spring-data-dialect + 2.1.0 + + org.webjars jquery diff --git a/web/querydsl/src/main/java/example/users/Application.java b/web/querydsl/src/main/java/example/users/Application.java index c65fcc82..f09cbfb1 100644 --- a/web/querydsl/src/main/java/example/users/Application.java +++ b/web/querydsl/src/main/java/example/users/Application.java @@ -20,8 +20,10 @@ import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; +import org.thymeleaf.dialect.springdata.SpringDataDialect; /** * @author Christoph Strobl @@ -44,6 +46,11 @@ public class Application extends WebMvcConfigurerAdapter { resourceChain(true); } + @Bean + SpringDataDialect springDataDialect() { + return new SpringDataDialect(); + } + @Autowired UserRepository repo; @PostConstruct diff --git a/web/querydsl/src/main/resources/templates/index.html b/web/querydsl/src/main/resources/templates/index.html index 569a9ed2..6b6bb450 100644 --- a/web/querydsl/src/main/resources/templates/index.html +++ b/web/querydsl/src/main/resources/templates/index.html @@ -1,26 +1,26 @@ - + User Center - + - +

User Center

- +

Search

- +
- +
@@ -44,33 +44,26 @@
- +
- + - + - + @@ -93,8 +86,10 @@
# FirstnameFirstname Lastname Nationality City
- + +
    +
    - + \ No newline at end of file