You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: Add full Java Config example for SqlSessionFactoryBean (#502)
Add complete Java Configuration examples (using @bean methods) for SqlSessionFactoryBean properties, including mapperLocations and Configuration instance settings.
This resolves the lack of programmatic configuration documentation requested in #502.
This will load all the MyBatis mapper XML files in the `sample.config.mappers` package and its sub-packages from the classpath.
61
73
62
74
One property that may be required in an environment with container managed transactions is `transactionFactoryClass`. Please see the relevant section in the Transactions chapter.
@@ -83,6 +95,29 @@ In case you are using the multi-db feature you will need to set the `databaseIdP
This configuration class must be located within a package scanned by the Spring container (e.g., within the main application package). The class name itself (e.g., `MyBatisConfig`) is arbitrary; only the `@Configuration` annotation is required.
0 commit comments