我正在使用maven多模块项目来创建war文件,以集成angular和spring-boot应用程序。是否可以使用Maven延迟加载功能模块块?这是我的前端pom.xml:
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.abc</groupId>
<artifactId>ParentDashboard</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>Frontend</artifactId>
<name>Frontend</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.github.eirslett</groupId>
<artifactId>frontend-maven-plugin</artifactId>
<version>1.3</version>
<configuration>
<nodeVersion>v10.16.3</nodeVersion>
<npmVersion>6.9.0</npmVersion>
<workingDirectory>src/main/web/</workingDirectory>
</configuration>
<executions>
<execution>
<id>install node and npm</id>
<goals>
<goal>install-node-and-npm</goal>
</goals>
</execution>
<execution>
<id>npm install --production</id>
<goals>
<goal>npm</goal>
</goals>
</execution>
<execution>
<id>npm run build</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
</configuration>
</execution>
<execution>
<id>prod</id>
<goals>
<goal>npm</goal>
</goals>
<configuration>
<arguments>run-script build</arguments>
</configuration>
<phase>generate-resources</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
我可以看到在Visual Studio代码中创建的块,但是使用这种Maven配置,我无法在Eclipse控制台中看到块。有人可以帮忙吗?
答案 0 :(得分:0)
似乎我已经使用package.json中的以下配置解决了该问题。
"build": "ng build --prod --aot --base-href=\"./\"".
现在我可以看到在Eclipse控制台中创建的各个模块块,并在devTools网络控制台中看到了块。