LoginSignup
0
0

More than 3 years have passed since last update.

Property 'configuration' and 'configLocation' can not specified with together

Posted at

spring-boot + mybatis環境で作業中、@MapperScanを追加したところで、エラーが発生。

Property 'configuration' and 'configLocation' can not specified with together

よく読まずにconfigurationが何か足りないのかなと思って時間を浪費してしまいました。よく読めば『「configuration」と「configLocation」は両方設定できませんせんよ』と書いてある通りでした。

設定ファイルに、mybatis.config-locationとmybatis.configurationを混在させていました。

application.properties
mybatis.config-location=classpath:/mybatis-config.xml
mybatis.configuration.default-fetch-size=100
mybatis.configuration.default-statement-timeout=30
mybatis.configuration.cache-enabled=false

mybatis.configuration.*の項目をmybatis-config.xmlにうつして解決。

環境

  • spring-boot:2.3.1
  • mybatis-spring-boot-starter:2.1.3 (MyBatis3.5.5)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0