Reputation: 4349
I have a Spring Boot back-end and need to implement an AngularJS(2) front-end to consume my REST API (both running on a single server). I'm a beginner but I haven't found a decent tutorial/demo to help me get started, considering that the following image is my project structure.
Upvotes: 1
Views: 1055
Reputation: 299
I'd recommend to have a look at jhipster (https://jhipster.github.io/), it's a yeoman generator that gives you a very nice, clean and tested codebase mixing a spring api and an angular front end. You can set up a project pretty fast and learn a lot from it's structure.
Upvotes: 1
Reputation: 15842
You should place the front-end in resources/public
or resources/static
or the third one which I don't remember.
Possible directory structure can be:
in resources/public
.
You also should point to that folder in your pom.xml
.
<build>
<resources>
<resource>
<directory>${project.basedir}/src/main/resources</directory>
</resource>
<resource>
<directory>${project.build.directory}/generated-resources</directory>
</resource>
</resources>
</build>
Upvotes: 0