Comments (4)
I have same problem. Unfortunately in spring official tutorial again same problem: https://spring.io/guides/tutorials/spring-security-and-angular-js/
I think only way to work Angular and Spring boot in same host is
developing Spring boot Rest Services and Angular separate folders.
After development process using "ng build" for angular project and copying content of "dist/project-name" into to spring boot app "src/main/resources/static" folder. Because by the time spring boot is up, it is look for index.html in "src/main/resources/static"
But I am not sure is this the correct way to develop Single Page Web Application with Spring Boot.
from spring-boot-angular.
Hey Muhammed, thanks for sharing!
Right now I am at work so I can't get much into details but when I was working on this side project serving an Angular app from a Spring boot backend, I came up with this article:
http://www.devglan.com/spring-boot/spring-boot-angular-deployment
It looked decent to me but I still don't know what is the preferred method to deploy an Angular app.
Cheers, Marcos.
from spring-boot-angular.
Thanks Marcos,
I found this https://blog.jdriven.com/2016/12/angular2-spring-boot-getting-started/
This is building a spring boot app with angular from starch in the same host :)
But this situation with Spring official tutorial has sad me.
from spring-boot-angular.
The app in this project works if you build and run it from Maven or the IDE (I used VSCode), as long as you have all the right features installed. The idea was to have a single app, not a front end and a back end (which is not what you need in production), so running ./ng serve
is never going to work.
from spring-boot-angular.
Related Issues (20)
- Could the guide work on MACOS HOT 2
- Include Bootstrap CSS in `src\styles.css` HOT 1
- java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty HOT 1
- Angular routing HOT 2
- Can't start the application HOT 5
- npm needs to be updated to 8.9 or higher HOT 1
- It would be helpful to state explicitly "./npm init" in documentation HOT 5
- Windows setup ?? HOT 2
- Use yarn over npm HOT 1
- BUILD FAILURE when trying to run with mvn spring:boot run HOT 1
- Info: ./ng e2e fails with Angular CLI 8.3.20 if delete favicon.ico HOT 2
- Upgrade node version HOT 1
- npm local install
- maybe specific to gitbash installation on windows?
- ng test failing
- Test backend HOT 1
- angular build broken after removing the content and id attributes from the greeting object in app.component.ts
- Update Node version in POM file HOT 1
- What are polyfills? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot-angular.