node-gradle / node-gradle/gradle-node-plugin
How to correctly configure multi project builds for spring boot?
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 677
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Thanks for this plugin and for your example shown in https://github.com/node-gradle/gradle-node-plugin/tree/master/examples/spring-boot-angular.
While my current setup already triggers some npm tasks and compiles without any problem, localhost:8080 still shows some json with my spring repositories/ data structures instead of the angular app. The only way to use my angular app is ng serve on localhost:4200 and annotate @CrossOrigin(origins = "http://localhost:4200") in the controllers.
May I ask some questions regarding this problem / related to your example:
- Is it really correct to have the spring application on the
rootlevel while thewebappis a subproject? From the gradle documentation (https://docs.gradle.org/current/userguide/multi_project_builds.html), I actually expected a more parallel structure without anysrcfolder on the root level and rather two subprojectsspringandwebappin parallel. In case both structures are possible, how do I configure thegradle-node-pluginto handle this parallel structure? - Is
gradle-node-pluginactually intended to also support local development of an angular app, i.e. are angular sources updated automatically under localhost:8080 just as I am used to it withng serveunderlocalhost:4200? If that is possible, I could actually remove the@CrossOrigin(origins = "http://localhost:4200")annotation in my controllers, right?
Any help is much appreciated, thanks in advance!
PS: I think part of the problem might be that in a parallel setup (spring and webapp as subprojects, no src folder on root level), webapp has it's own build-folder and hence the static resources are not copied into the output of spring???
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the examples/spring-boot-angular example and compare its root-level Spring application and webapp subproject with the proposed parallel spring and webapp structure. Check how the plugin handles the webapp build output and whether localhost:8080 can provide Angular development behavior; done means the supported configuration and development workflow are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, nodejs, spring-boot
- Domain
- build-system, web-dev
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100