For the complete documentation index, see llms.txt. This page is also available as Markdown.

Quickstart

  1. Initialize the project on Spring Initializer with the following 4 dependencies:

  • Lombok

  • Spring Web

  • Validation

  • [A database driver]

  1. Add DoytoQuery dependencies in pom.xml:

<dependency>
    <groupId>win.doyto</groupId>
    <artifactId>doyto-query-jdbc</artifactId>
    <version>2.1.0</version>
</dependency>
<dependency>
    <groupId>win.doyto</groupId>
    <artifactId>doyto-query-web</artifactId>
    <version>2.1.0</version>
</dependency>
<dependency>
    <groupId>win.doyto</groupId>
    <artifactId>doyto-query-dialect</artifactId>
    <version>2.1.0</version>
</dependency>
  1. Define entity and query objects for a table:

Invoking the method DataAccess#query(Q) in UserService:

Define a controller to support RESTful API:

Set the log level of logging.level.org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping to trace, and after starting the Spring Boot application, you can see in the console that the RESTful interface is ready for /user/:

Refer to the demo for more details.

Last updated