小编ted*_*eum的帖子

为什么document.getElementById在页面中获取多个iframe时返回null

我试试这个页面,只有if1返回,if2和if3返回null,为什么?下面是html代码谢谢.(小提琴)

     <html>
 <head>
  <title> New Document </title>
  <script type="text/javascript">
  <!--
    function dotest() {
        alert(document.getElementById("if1"));
        alert(document.getElementById("if2"));
        alert(document.getElementById("if3"));
    }
  //-->
  </script>
 </head>
 <body>
 <input type="button" value="Test Test" onclick="dotest()">
  <iframe id="if1"/>
  <iframe id="if2"/>
  <iframe id="if3"/>
 </body>
</html>
Run Code Online (Sandbox Code Playgroud)

html javascript iframe

3
推荐指数
1
解决办法
2182
查看次数

如何在 Kotlin 中使用 QueryDSL 并生成文件

我使用下面的 maven pom.xml 文件并且无法生成 querydsl 文件。

我发现了一个问题:Kotlin-Kapt Annotation Processor not working with maven

我想从 kotlin 实体类生成 jpa querydsl 文件。

网上有一个很好的例子,说明如何使用 gradle https://github.com/JetBrains/kotlin-examples/blob/master/gradle/kotlin-querydsl/build.gradle生成 dsl 文件。

但是,我尝试在 Maven 中实现这一点,但没有运气。我目前的pom在下面。有人知道可能是什么问题吗?提前致谢。

它使用 querydsl3 而我使用 4

<?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>

	<groupId>cn.techcave.chat</groupId>
	<artifactId>jpa</artifactId>
	<version>0.0.1-SNAPSHOT</version>
	<packaging>jar</packaging>

	<name>jpa</name>
	<description>Kotlin Demo project for Spring Boot JPA</description>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.5.9.RELEASE</version>
		<relativePath/> <!-- lookup parent from repository -->
	</parent>

	<properties>
		<kotlin.compiler.incremental>true</kotlin.compiler.incremental>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<java.version>1.8</java.version>
		<kotlin.version>1.2.10</kotlin.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId> …
Run Code Online (Sandbox Code Playgroud)

plugins spring querydsl kotlin

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

标签 统计

html ×1

iframe ×1

javascript ×1

kotlin ×1

plugins ×1

querydsl ×1

spring ×1