org.apache.wicket.markup.markupnotfoundexception:无法确定标记.组件尚未



我运行gradle脚本,依赖木星,小门弹簧启动和跳启动器启动器

buildscript {
    repositories {
        mavenCentral()
        // The following is only necessary if you want to use SNAPSHOT releases.
        // maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
    }
    dependencies {
        classpath 'org.junit.platform:junit-platform-gradle-plugin:1.0.2'
    }
}
apply plugin: 'org.junit.platform.gradle.plugin'
// Apply the java-library plugin to add support for Java Library
apply plugin: 'java'
junitPlatform {
    reportsDir file('build/test-results/junit-platform') // this is the default
    enableStandardTestTask true
    // selectors (optional)
    // filters (optional)
}
// In this section you declare where to find the dependencies of your project
repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()
}
dependencies {// https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter
compile group: 'org.springframework.boot', name: 'spring-boot-starter', version: '1.5.9.RELEASE'
// https://mvnrepository.com/artifact/com.giffing.wicket.spring.boot.starter/wicket-spring-boot-starter
compile group: 'com.giffing.wicket.spring.boot.starter', name: 'wicket-spring-boot-starter', version: '2.0.4'
}
dependencies {
    testCompile("org.junit.jupiter:junit-jupiter-api:5.0.2")
    testRuntime("org.junit.jupiter:junit-jupiter-engine:5.0.2")
}
dependencies {
    testCompile("junit:junit:4.12")
    testRuntime("org.junit.vintage:junit-vintage-engine:4.12.2")
}

测试

package steinKo.ATM.Web.test.unit;
import org.apache.wicket.util.tester.WicketTester;
import org.junit.jupiter.api.Test;
class HomePageTest {
    private WicketTester tester;
    @Test
    public void shouldRender() {
        tester = new WicketTester();
        tester.startPage(HomePage.class);
        tester.assertRenderedPage(HomePage.class);
    }
}

班上

package steinKo.ATM.Web;
import org.apache.wicket.markup.html.WebPage;
public class HomePage extends WebPage{
    /**
     * 
     */
    private static final long serialVersionUID = 1L;
}

使用HTML

插入 标题在这里

i recive folloing错误消息

2:57:15.185 [主要]调试 org.apache.wicket.core.util.resource.locator.rocator.resourcestreamlocator- 尝试使用使用资源'org/apache/witchet/page.html'使用 查找器'[webapppath:/]'22:57:15.185 [main]调试 org.apache.wicket.core.util.resource.locator.rocator.resourcestreamlocator- 尝试使用使用资源'org/apache/witchet/page.html'使用 查找器'[classpath:meta-inf/resources/]'22:57:15.186 [main]调试 org.apache.wicket.markup.markupcache-找不到标记: steinko.atm.web.homepage_nb_no.html 22:57:15.195 [main]调试 org.apache.wicket.page.pageaccesssynchronizer-"主要"尝试 以ID'0'22:57:15.195 [MAIN] DEBUG获取锁定到页面 org.apache.wicket.page.pageaccesssynchronizer-主要获得的锁 页0 22:57:15.229 [main]警告requestCycleextra- *******************************************************************************************************************************:15.232 [main]警告requestCycleExtra-处理以下例外 org.apache.wicket.markup.markupnotfoundexception:无法确定 标记。组件尚未连接到父母。[page class = steinko.atm.web.homepage,id = 0,渲染计数= 1]

我认为由于homepage.java和homepage.hlml的gradle
之间的链接缺乏链接
我如何解决此错误?

解决方案

sourceSets {
    main {
        java {
            srcDirs = ['src/main/java']
        }
        resources {
            srcDirs = ['src/main/java','src/main/resources']
        }
    }
}

相关内容

  • 没有找到相关文章

最新更新