Appendix
Jimmer has many configurations, some of which can be configured in Spring Boot's application.yml
or application.properties
. Such as:
Property | Type | Default Value | Description |
---|---|---|---|
jimmer.language | java | kotlin | java | Must be configured for Kotlin projects |
jimmer.dialect | string | Jimmer's default dialect | Jimmer dialect class name |
jimmer.show-sql | boolean | false | Whether to print SQL logs |
jimmer.pretty-sql | boolean | false | Whether to format SQL |
jimmer.inline-sql-variables | boolean | false | Whether to inline SQL parameters(This only affects the logs. The actual SQL executed still uses JDBC parameters) |
jimmer.executor-context-prefixes | List<String> | [] | Usually multiple package names or full class names, Jimmer judges whether the current stacktrace should be appended to the SQL logs |
jimmer.database-validation.mode | NONE | WARNING | ERROR | NONE | Database validation mode |
jimmer.database-validation-mode | Same as above | Same as above | Same as above |
jimmer.database-validation.catalog | string | Catalog of validated tables' database, configured when table name conflicts | |
jimmer.database-validation.schema | string | Schema of validated tables' database, configured when table name conflicts | |
jimmer.trigger-type | BINLOG_ONLY | TRANSACTION_ONLY | BOTH | BINLOG_ONLY | Trigger type |
jimmer.id-only-target-checking-level | NONE | FAKE | ALL | NONE | Whether to check short associated ids in save commands |
jimmer.save-command-pessimistic-lock | boolean | false | Whether queries in save commands use pessimistic locks |
jimmer.default-enum-strategy | NAME | ORDINAL | NAME | Default mapping mode for enums without explicit declaration |
jimmer.default-batch-size | int | 128 | Default fetch size for non-collection properties |
jimmer.default-list-batch-size | int | 16 | Default fetch size for collection properties |
jimmer.offset-optimizing-threshold | int | Integer.MAX_VALUE | Offset threshold to enable deep paging optimization for paged queries |
jimmer.is-foreign-key-enabled-by-default | boolean | true | Foreign keys without explicit declaration are treated as real foreign keys |
jimmer.transaction-cache-operator-fixed-delay | int | 5000 | Retry interval for failed or excessive cache invalidation tasks when trigger type is TRANSACTION_ONLY (not relying on external CDC) |
jimmer.micro-service-name | string | Service name of current application if using remote associations | |
jimmer.error-translator.disabled | boolean | false | Whether to disable exception mapping in automatic front-end integration |
jimmer.error-translator.http-status | int | 500 | Unified HTTP status of server exceptions on client side |
jimmer.error-translator.debug-info-supported | boolean | false | Whether to include exception message etc. to help debugging in client errors, should be disabled in production |
jimmer.error-translator.debug-info-max-stack-trace-count | int | 0 | Maximum number of stacktrace in exception information in client errors, should be disabled in production |
jimmer.client.ts.path | string | Download path of automatically generated TypeScript code, e.g. "/ts.zip" | |
jimmer.client.ts.api-name | string | Api | API name of automatically generated TypeScript code |
jimmer.client.ts.indent | int | 4 | Indentation of automatically generated TypeScript code |
jimmer.client.ts.anonymous | boolean | false | Whether to use anonymous style to avoid naming DTO types in automatically generated TypeScript code |
jimmer.client.ts.mutable | boolean | false | By default, the Typescript generated by Jimmer serves the React ecosystem, so there are a lot of readonly modifiers in the TS type declarations. If this behavior is not desirable, please set this configuration to true |
jimmer.client.java-feign.path | string | Download path of automatically generated Spring Cloud Feign Java code, e.g. "/java-feign.zip" | |
jimmer.client.java-feign.api-name | string | Api | API name of automatically generated Spring Cloud Feign Java code |
jimmer.client.java-feign.indent | int | 4 | Indentation of automatically generated Spring Cloud Feign Java code |
jimmer.client.java-feign.base-package | string | Top level package of automatically generated Spring Cloud Feign Java code |