spring boot打包发布问题: mybatis-spring & spring boot - Could not resolve type alias issue

  1. remove     sqlSessionFactoryBean.setTypeAliasesPackage("com.your.packae.pojo")
  2. change     resultType="MyClass" to resultType="com.your.packae.pojo.MyClass"
  3. repackage
  4. <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                    <fork>true</fork>
                    </configuration>
                    <executions>
    		         <execution>
    		           <goals>
    		             <goal>repackage</goal>
    		           </goals>
    		         </execution>
    		       </executions>
    </plugin>

猜你喜欢

转载自blog.csdn.net/qq_35893120/article/details/80637143