小编Try*_*est的帖子

mybatis生成器"列名模式不能为NULL或为空"

我在eclipse中使用MyBatis Generator.这是generatorConfig.xml文件.当我右键单击并选择"生成MyBatis工件"时,它会显示错误消息,如"列名模式不能为NULL或为空".

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE generatorConfiguration PUBLIC "-//mybatis.org//DTD MyBatis Generator Configuration 1.0//EN" "http://mybatis.org/dtd/mybatis-generator-config_1_0.dtd">
<generatorConfiguration>
    <classPathEntry
        location="C:\Users\myplace\.m2\repository\mysql\mysql-connector-java\6.0.2\mysql-connector-java-6.0.2.jar" />
  <context id="context1">
  <plugin type="org.mybatis.generator.plugins.SerializablePlugin" />
        <plugin type="org.mybatis.generator.plugins.ToStringPlugin" />
  <jdbcConnection driverClass="com.mysql.jdbc.Driver"
            connectionURL="jdbc:mysql://localhost:3306/world?serverTimezone=EST"
            userId="root" password="root" />
    <javaModelGenerator targetPackage="com.example.ws.model" targetProject="com.example.ws" />
    <sqlMapGenerator targetPackage="com.example.ws.sql" targetProject="com.example.ws" />
   <javaClientGenerator targetPackage="com.example.ws.mapper" targetProject="com.example.ws" type="ANNOTATEDMAPPER" />
    <table schema="world" tableName="city">
      <columnOverride column="ID" property="id" javaType = "Integer" />
      <columnOverride column="Name" property="name" javaType = "String" />
      <columnOverride column="CuntryCode" property="cuntryCode" javaType = "String" />     
      <columnOverride column="District" property="district" javaType = "String" />
      <columnOverride column="Population" property="population" javaType …
Run Code Online (Sandbox Code Playgroud)

mysql mybatis mybatis-generator

6
推荐指数
2
解决办法
4248
查看次数

Maven编译器插件使用Java 7配置但仍编译Java 8代码

在我的项目中,我们将使用Java 7,maven-compiler-plugin并且我们假设在Maven编译之后,使用Java 8的所有代码都不应该成功编译.

但是,就我而言,有一个文件Arrays.stream(T[] array)可以在Java 8中使用,它仍然可以成功编译.下面是pom.xml配置Java版本的一些文件.请您查看并告诉我为什么我的文件仍可以成功编译,尽管我将其配置为Java 7?

对于pom.xml,我跳过依赖项等等,只列出属性和构建.

<properties>
    <java.version>1.7</java.version>
</properties>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>${maven-compiler-plugin.version}</version>
            <configuration>
                <source>${java.version}</source>
                <target>${java.version}</target>
            </configuration>
        </plugin>
    </plugins>
</build> 
Run Code Online (Sandbox Code Playgroud)

对于我在Java 8中使用方法的文件,该行是这样的:

buffer.append(Arrays.stream(arg).collect(Collectors.joining("/")));
Run Code Online (Sandbox Code Playgroud)

我想要的是,因为我在Maven中配置Java版本为7并且在编译之后,使用Java 8的文件不应该成功编译并显示诸如"......仅允许在源级别1.8或更高级别的错误" ".

java eclipse maven maven-compiler-plugin

4
推荐指数
1
解决办法
1076
查看次数

IntelliJ 外部 Maven 库可以告诉依赖项来自哪里吗?

我正在使用 IntelliJ 和 maven 作为依赖项。从外部库中,我可以看到 maven 导入依赖项。

在此处输入图片说明

像这样的东西,有可能知道这些依赖来自哪里吗?我尝试在 pom 文件中搜索 com.sun.xml: jaxb-core 但我无法准确找到该依赖项。那么有可能知道这个单一的依赖来自哪里吗?谢谢!

java intellij-idea maven

2
推荐指数
2
解决办法
1404
查看次数