NutzCN Logo
问答 NutBoot通过官网下载的项目,install后运行出现如下错误
发布于 2289天前 作者 shuxinyun 1533 次浏览 复制 上一个帖子 下一个帖子
标签:
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-urule/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-urule/2.3-SNAPSHOT/maven-metadata.xml (969 B at 17.2 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-ureport/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-ureport/2.3-SNAPSHOT/maven-metadata.xml (971 B at 16.9 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-wkcache/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-wkcache/2.3-SNAPSHOT/maven-metadata.xml (971 B at 19.8 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-wkcache/1.r.67-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutz-plugins-wkcache/1.r.67-SNAPSHOT/maven-metadata.xml (2 KB at 19.1 KB/sec)
Downloading: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-feign/2.3-SNAPSHOT/maven-metadata.xml
Downloaded: http://jfrog.nutz.cn/artifactory/snapshots/org/nutz/nutzboot-starter-feign/2.3-SNAPSHOT/maven-metadata.xml (969 B at 17.9 KB/sec)
[INFO] 
[INFO] --- nutzboot-maven-plugin:2.3-SNAPSHOT:run (default-cli) @ epei ---
log4j:WARN No appenders could be found for logger (org.nutz.boot.banner.SimpleBannerPrinter).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
log4j.rootLogger=debug,Console

log4j.logger.org.eclipse.jetty=info
log4j.logger.org.apache.jasper=info
log4j.logger.org.apache.catalina=info
log4j.logger.org.apache.tomcat=info

log4j.appender.Console=org.apache.log4j.ConsoleAppender
log4j.appender.Console.layout=org.apache.log4j.PatternLayout
log4j.appender.Console.layout.ConversionPattern=[%-5p] %d{HH:mm:ss.SSS} %l - %m%n

所有的都是没有变动,直接下载运行的

19 回复
<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>shuxin</groupId>
    <artifactId>epei</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <nutzboot.version>2.3-SNAPSHOT</nutzboot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.nutz</groupId>
                <artifactId>nutzboot-parent</artifactId>
                <version>${nutzboot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-swagger</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-mvc</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-dao</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jetty</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jdbc</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-redis</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-quartz</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-weixin</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-dubbo</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-zbus</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-ngrok</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-sharding-jdbc</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-beetlsql</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-shiro</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-beetl</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-thymeleaf</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-disque</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-uflo</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-urule</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-ureport</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-wkcache</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-feign</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.196</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>nutz</id>
            <url>http://jfrog.nutz.cn/artifactory/libs-release</url>
        </repository>
        <repository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>**/*</exclude>
                </excludes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-resources</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF-8</encoding>
                            <outputDirectory>
                                ${project.build.directory}
                            </outputDirectory>   <!-- 表示把配置文件拷到和jar包同一个路径下 -->
                            <resources>
                                <resource>
                                    <directory>src/main/resources/</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.nutz.boot</groupId>
                <artifactId>nutzboot-maven-plugin</artifactId>
                <version>${nutzboot.version}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.0.2</version>
                <configuration>
                    <archive>
                        <manifest>
                            <addClasspath>true</addClasspath>
                            <classpathPrefix>lib/</classpathPrefix>
                            <useUniqueVersions>false</useUniqueVersions>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <mainClass>shuxin.epei.MainLauncher</mainClass>
                        </manifest>
                        <manifestEntries>
                            <Class-Path>.</Class-Path>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy</id>
                        <phase>package</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>
                                ${project.build.directory}/lib
                            </outputDirectory>
                            <overWriteReleases>false</overWriteReleases>
                            <overWriteSnapshots>false</overWriteSnapshots>
                            <overWriteIfNewer>true</overWriteIfNewer>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

啊啊啊, 那个东西默认生效, 我改回去

不对呀, 你选了最后面的"资源、配置文件放jar包外面"吗???

是的呀!
难道我需要移动目录

我打包jar也是同样错误的

别选... 那是高级选项...

我都选了昵,准备全面体验一下你的这个高端产品!

我重新下下载了,运行打包正常:
运行:http://127.0.0.1:8080/time/now正常
运行:http://127.0.0.1:8080/或http://127.0.0.1:8080/index.html
HTTP ERROR 404
Problem accessing /index.html. Reason:

Not Found

resources\static目录下有这个index.html文件的

选了tomcat吗? 有可能, 换成jetty肯定行

嗯,选了tomcat了!我关闭

改一下依赖就行...

刚重新下载了新项目,没有选tomcat运行起来后同样问题,依赖:

<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>shuxin.epei</groupId>
    <artifactId>im</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    <properties>
        <nutzboot.version>2.3-SNAPSHOT</nutzboot.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.nutz</groupId>
                <artifactId>nutzboot-parent</artifactId>
                <version>${nutzboot.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-swagger</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-mvc</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-nutz-dao</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jetty</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-jdbc</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-redis</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-quartz</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-shiro</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-beetl</artifactId>
        </dependency>
       <dependency>
            <groupId>org.nutz</groupId>
            <artifactId>nutzboot-starter-wkcache</artifactId>
        </dependency>
        <dependency>
            <groupId>com.h2database</groupId>
            <artifactId>h2</artifactId>
            <version>1.4.196</version>
        </dependency>
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>5.1.44</version>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>
        </dependency>
    </dependencies>
    <repositories>
        <repository>
            <id>nutz</id>
            <url>http://jfrog.nutz.cn/artifactory/libs-release</url>
        </repository>
        <repository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>nutz-snapshots</id>
            <url>http://jfrog.nutz.cn/artifactory/snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </pluginRepository>
    </pluginRepositories>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.7.0</version>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                    <compilerArgs>
                        <arg>-parameters</arg>
                    </compilerArgs>
                    <useIncrementalCompilation>false</useIncrementalCompilation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.nutz.boot</groupId>
                <artifactId>nutzboot-maven-plugin</artifactId>
                <version>${nutzboot.version}</version>
            </plugin>
        </plugins>
    </build>
</project>

还是首页打不开

如何运行的??

idea中
maven
nutzboot:run

除了导入项目,还修改过什么吗?

什么也没有修改
下载解压后,第一步运行:install
第二步:nutzboot:run

然后获取时间正常,打开网页报错

不需要install, 我来试试看

试了一下, 下载后解压, 命令直接跑没问题的,首页正常

mvn clean compile nutzboot:run

嗯,我的错,之前错误情况下的jetty应用没有关闭,后来运行的都没有起作用

添加回复
请先登陆
回到顶部