<?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>mk.edu.ukim.feit.bolt</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.3.RELEASE</version>
<relativePath/>
</parent>
<modules>
<module>api</module>
<module>frontend</module>
</modules>
<?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>
<artifactId>frontend</artifactId>
<name>Bolt Client</name>
<description>Bolt messaging app frontend client</description>
<parent>
<groupId>mk.edu.ukim.feit.bolt</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.4</version>
<configuration>
<nodeVersion>v7.9.0</nodeVersion>
<npmVersion>4.6.1</npmVersion>
<workingDirectory>src/main/frontend</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>npm run prod</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run prod</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>target/frontend</directory>
<targetPath>static</targetPath>
</resource>
</resources>
</build>
<?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>
<artifactId>api</artifactId>
<version>1.0-SNAPSHOT</version>
<name>Bolt API</name>
<description>Bolt messaging app REST API</description>
<packaging>war</packaging>
<parent>
<groupId>mk.edu.ukim.feit.bolt</groupId>
<artifactId>parent</artifactId>
<version>1.0-SNAPSHOT</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>org.springframework.boot</groupId>-->
<!--<artifactId>spring-boot-starter-jdbc</artifactId>-->
<!--</dependency>-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-mail -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>1.5.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.restdocs</groupId>
<artifactId>spring-restdocs-mockmvc</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>compile</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/io.jsonwebtoken/jjwt -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>0.6.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/joda-time/joda-time -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>2.9.9</version>
</dependency>
<!-- https://mvnrepository.com/artifact/commons-validator/commons-validator -->
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>mk.edu.ukim.feit.bolt</groupId>
<artifactId>frontend</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
我在学习本教程的过程中,最终成功地构建了从父目录运行mvn clean install的项目,然后进入api目录并运行mvn Spring-Boot:Run,应用程序在localhost:8080上提供服务,但是在构建war文件时,Maven不知怎么地没有接收从Angular编译的静态文件,而是在http://localhost:8080上给我一个404。有谁能告诉我这里可能出了什么问题吗?
我还尝试将“prod”NPM脚本设置为“ng build--prod--base-href=\”./\“”,认为可能需要对它做些什么,但没有帮助。有什么想法吗?
我找到的解决办法是:
示例:
@Controller
public class HomeContoller {
@RequestMapping("/")
public String index() {
return "index";
}
}
Maven + Springboot + Electron (+ OpenJDK) This project is a starting point to wrap any Java web application (f.e. using Springboot) with electron as a native executable. For the build process, only ma
我相信这是一个简单的问题,但我找不到答案或至少在搜索中使用正确的术语。 我正在一起设置和。默认情况下,将使用和等路径。 如果可能的话,我希望避免使用path作为哈希。正如Angular文档所述: 路由器的provideRouter函数将LocationStrategy设置为PathLocationStrategy,使其成为默认策略。如果我们愿意,我们可以在引导过程中切换到带有重写的HashLoca
问题内容: 我相信这是一个简单的问题,但我找不到答案,或者至少在搜索中使用正确的字词。 我正在设置并在一起。默认情况下,Angular将使用和之类的路径。 如果可能的话,我想避免使用path作为哈希值。如Angular 文档所述: 路由器的r函数将设置为,使其成为默认策略。如果愿意,我们可以在引导过程中使用覆盖切换到。 然后… 几乎所有Angular 2项目都应使用默认的HTML 5样式。它产生的
当试图在eclipse上运行spring boot maven项目时,会出现错误。“启动配置附件引用不存在的项目演示2.”请任何人帮忙修正那个错误。
父项目为demo-mybatis子模块为mybatis-dao、demo-service。demo-mybatis pom.xml如下: 4.0.0 pom mybatis-DAO Demo-service Demo-mybatis-app org.springframework.Boot spring-boot-starter-parent 2.3.2.release com.example D
当运行我的jar文件:java-jar target/places-1.0-snapshot.jar时,我得到了下一个错误: 我的pom.xml包含spring-boot-maven-plugin: 知道我还能试试什么吗?
本文向大家介绍maven+springboot打成jar包的方法,包括了maven+springboot打成jar包的方法的使用技巧和注意事项,需要的朋友参考一下 maven的命令: 1.mvn clean package -DskipTests:在项目目录下运行此命令,在target目录下生成jar包或war包。 2.mvn clean:清理项目生产的临时文件,一般是模块下的target目录 3
我想用Gitlab CI自动构建我的Spring Boot项目,但它给了我以下错误消息。我已经尝试了一些我在这里找到的解决方案,但没有一个对我有效。当我在本地机器上运行时,它运行时没有任何错误。