最奇怪的事情(Java和Angular(简单))

时间:2018-05-16 15:21:52

标签: java angular maven

我有一个棱角分明的弹簧靴项目。

我无法从Spring Boot的资产中加载任何东西(我尝试了50种不同的路径,没有任何作用)我从intellij复制路径

 this.image = (image == null) ? Files.readAllBytes(new File("static/images/default-user-image.jpg").toPath()) : image;

但我可以从前端应用

 this.image = (image == null) ? Files.readAllBytes(new File("src/frontend/src/assets/images/add.png").toPath()) : image;

我认为这是因为maven,但我不知道是什么

<build>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <version>1.6.0</version>
            <executions>
                <execution>
                    <phase>validate</phase>
                    <goals>
                        <goal>exec</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <executable>ng</executable>
                <workingDirectory>src/frontend</workingDirectory>
                <arguments>
                    <argument>build</argument>
                </arguments>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

0 个答案:

没有答案
相关问题