Git Product home page Git Product logo

Comments (4)

MuhammedOzdogan avatar MuhammedOzdogan commented on August 13, 2024

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.

capture

from spring-boot-angular.

mrksph avatar mrksph commented on August 13, 2024

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.

MuhammedOzdogan avatar MuhammedOzdogan commented on August 13, 2024

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.

dsyer avatar dsyer commented on August 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.