-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Duplication error of type alias #461
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I cannot reproduce this. Can you provide a small project that demonstrates the problem? |
Thank you.I have known how to solve the problem. SpringBoot set the version of mybatis-spring-boot-starter too high more than 2.0. But my mybatis-generator-core's version is 1.3.5 and mybatis-generator-maven-plugin's version is 1.3.2. And errors appeared.After I turned mybatis-spring-boot-starter's version to 1.3.2 , the errors disappeared. |
Hi @Asperger12345 , There is a possibility of the influence of mybatis/spring#362 If you use the mybatis-spring-boot-starter 2.0.1. Could you provide a reproduce project? |
@kazuki43zoo, You can use IDEA establish a springboot-mybatis project.Then use the generator plugin to generate.Until now, all is OK.Then you can test the *Mapper.java,the errors appear. |
Could you provide |
mybatis.mapper-locations=classpath:mapper/*Mapper.xml |
Are you use which version of mybatis-spring-boot-starter ? 2.0.0? 2.0.1? |
2.0.1 |
@Asperger12345 Thanks for your reply! Probably This issue's cause is mybatis/spring#362. It is resolved already at 2.0.2-SNAPSHOT. Could you try the mybatis-spring 2.0.2-SNAPSHOT ?
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.0.2-SNAPSHOT</version>
</dependency>
</dependencyManagement>
<!-- ... -->
<repositories>
<repository>
<id>sonatype-oss-snapshots</id>
<name>Sonatype OSS Snapshots Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories> |
2.0.2-SNAPSHOT is deployed already ... There is possibility that you need to additional operation for applying it on your IDE. IDEAproject > Maven > Reimport Eclipseproject > Maven > Update Project |
of course i know ,but no use. <repositories>
<repository>
<id>sonatype-oss-snapshots</id>
<name>Sonatype OSS Snapshots Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.47</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<!--微信公众号SDK-->
<dependency>
<groupId>com.github.binarywang</groupId>
<artifactId>weixin-java-mp</artifactId>
<version>3.3.0</version>
</dependency>
<!--支付SDK-->
<dependency>
<groupId>cn.springboot</groupId>
<artifactId>best-pay-sdk</artifactId>
<version>1.2.0</version>
</dependency>
<!--lombok-->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!--mybatis-->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.0.2-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
</dependencies> |
I can find it as follow: <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>generator-gh-461-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>generator-gh-461-demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>2.0.2-SNAPSHOT</version>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.5</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>sonatype-oss-snapshots</id>
<name>Sonatype OSS Snapshots Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> Could you build using Maven command as follow?
|
oh ,my god.You are right.Could you tell me why need ? I'm sorry I am an new man to use github so that many functions i can't use,and i have other things to do .My opinion is that this is still a version problem .Maybe the mybatis-generator-core needs updating to suit mybatis-spring-boot-starter. And i am an student , maybe i am making irresponsible remarks,just forgive me . Thank you for your help me however. |
I've closed this issue because this issue does not belong this project. If there is bug, please create new issue on related project(mybatis-spring, mybatis-spring-boot, etc ...). Thanks. |
We manage bug report and feature request(includes improvement) using GitHub issue tracker. Thanks. |
The text was updated successfully, but these errors were encountered: