All Questions
Tagged with spring-boot angular
2,329
questions
57
votes
7
answers
152k
views
Blocked because of a disallowed MIME type (“text/html”) : Angular 8 deployed on tomcat 9.0.30 fails to serve the assets
I have a project in which the user interface is based on angular 8 and the backend is a springboot java service. The entire project is a multi module project with the angular part being a separate ...
52
votes
9
answers
37k
views
Springboot/Angular2 - How to handle HTML5 urls?
I believe this is a simple question, but I couldn't find an answer or at least use the correct terms in the search.
I am setting up Angular2 and Springboot together. By default, Angular will use ...
47
votes
2
answers
45k
views
Choosing between Thymeleaf and Angular for a new Spring MVC project [closed]
I'm starting a new Spring Boot web application and I need to make a choice about how to implement front-end.
I'm really comfortable with Thymeleaf templating framework that I used in several projects,...
32
votes
13
answers
61k
views
Spring Boot with redirecting with single page angular2
I have a single page Angular app with Spring Boot. It looks like the following:
src
main
java
controller
HomeController
CustomerController
OtherController
webapp
js/...
25
votes
9
answers
218k
views
Access blocked by CORS policy: Response to preflight request doesn't pass access control check
I'm trying to create a user administration API for my web app. When I send an API call from my frontend to my backend, a cors error occurs. How can the cors problem be solved? I've read a lot of ...
18
votes
9
answers
22k
views
Spring Boot with AngularJS html5Mode
I start my web application with spring boot. It use a simple main class to start an embedded tomcat server:
@Configuration
@EnableAutoConfiguration
@ComponentScan
public class Application {
...
18
votes
4
answers
21k
views
Angular 6 - browser-crypto.js:3 Uncaught ReferenceError: global is not defined
I am implementing socketjs. however i have encountered below error.
Below are the socket and stomp packages which i am using.
import * as SockJS from 'sockjs-client';
import * as Stomp from '...
18
votes
4
answers
12k
views
Spring Boot/Angular 4 - Routing in app hits the server
I have an Angular 4 (ES6) app that I want to serve from a Spring Boot application. My Angular app has an index.html, and when the address of http://localhost:8080 is hit, Spring Boot knows to map to ...
18
votes
2
answers
4k
views
Configure Spring Framework 5.3+, Spring Boot 2.3+ Routing for SPA frontend
I have a simple frontend application made using Angular. All routings are handled by Angular so I want Spring boot to forward all page traffics to "/" so angular routing can handle them.
...
17
votes
4
answers
12k
views
Angular 2 spring boot server side events
Can somebody please provide me an example for spring boot server side events?
Basically I need to push server side events to browser. I'm using angular 2 and spring boot backend.
Please provide me 1 ...
15
votes
4
answers
33k
views
Springboot endpoint 403 OPTIONS when doing a POST request
I'm running a service using Spring and my Angular front-end is getting a 403 with Request Method: OPTIONS when it tries to make a POST request.
Both the Spring service and the Angular app are ...
15
votes
2
answers
17k
views
Make front- and backend (Angular 2 and Spring) Maven Multimodule Project
How do I create a Maven multimodule project with a Spring backend and Angular2 front-end? Using spring initializr (https://start.spring.io) and angular cli separately seems to be straightforward, but ...
15
votes
5
answers
5k
views
how to handle json stream issued by spring boot 2 in angular 5
Spring boot 2 WebFlux generate Json stream in the new version
for example
@GetMapping(value = "stream", produces = APPLICATION_STREAM_JSON_VALUE)
public Flux<Data> stream() {
return Flux....
14
votes
3
answers
20k
views
How to add static files to jar using Gradle build in Spring Boot + Angular 2 project
I have a Spring Boot + Angular 2 project. I want to deploy it to Heroku.
I'm able to run the npm build then copy the generated files over to the public folder (src/resources/public) manually, then run ...
14
votes
1
answer
34k
views
Angular 6 ResponseContentType
I'm trying to download some xls from my api rest, but to no avail, do I need something to use ResponseContentType?
[ts] O módulo '"/home/dev/Documentos/JAVA-TUDO/SIMPLUS/simplus-cliente/node_modules/@...
14
votes
1
answer
7k
views
Set-Cookie Header Not Appearing In Google Chrome
Problem
I am running a Spring Boot server with a Post endpoint that sets a cookie. When making a request to the endpoint from my angular app I do not see the Set-Cookie header in the response headers ...
13
votes
10
answers
23k
views
Keycloak with Angular and Spring error: GET http://localhost:8180/auth/realms/Storage/protocol/openid-connect/3p-cookies/step1.html 404 (Not Found)
I'm trying to integrate Keycloak with Spring Boot and Angular.
Security works correctly. When I'm trying to access secured endpoint manually through browser localhost:8080/products/1 (products is ...
13
votes
2
answers
5k
views
Google Sign-In with Backend Verification Flow Clarification
I've spent hours trawling through various tutorials and articles and am finally giving in to asking.
I want to enforce the use of Google Sign-In authentication for all users of my Angular 7 ...
13
votes
3
answers
4k
views
Spring Boot + Angular 4 with i18n
I am currently developing an Angular 4 application with Spring Boot as backend. I use Maven to build the projects configured as explained in https://blog.jdriven.com/2016/12/angular2-spring-boot-...
13
votes
4
answers
5k
views
Required request part 'file' is not present - Angular2 Post request
I am trying to get my file upload functionality done using Angular2 and SpringBoot. I can certify that my java code for the file uploading working fine since I have tested it successfully using ...
12
votes
4
answers
34k
views
CORS Angular and SpringBoot - request blocked
I have a problem that I don't seem to figure out.
I want to send a http request from my
Angular client:
const url = 'http://localhost:8080/api';
console.log(this.http.get(url).subscribe(data => ...
12
votes
8
answers
5k
views
Angular PUT request is Forbidden over SSL
I am using Angular 5 as a front end with a Spring Boot REST server. Everything was working properly if not using SSL. When I switch to SSL, eventually I got everything sort of working. It works for ...
12
votes
5
answers
2k
views
HTML5 History API auto routing refresh error
I am currently working with a project using SpringBoot at the backend and HTML5 and Angular 2 at the frontend.
After I deploy the project, everything works fine when I navigate in the browser, until I ...
11
votes
3
answers
3k
views
Spring Boot + Angular 2 structure
In my project I want to use Spring Boot and Angular 2.
Structure of Spring Boot App is done from Spring Initializer.
Structure of Angular 2 App is done by Angular CLI tool (ng new myfrontendapp)
...
11
votes
2
answers
1k
views
Angular 6 Spring Boot POST Issue
I am trying to set up an angular 6 application that talks to a local spring boot REST application.
I have finally been able to login, and use GET requests, which seem to use the correct cookies. ...
11
votes
3
answers
4k
views
How to setup structure with SpringBoot and Angular2?
I'm trying to use Angular2 with Springboot, but I can't set them together.
I first started a springboot project, and then tried to follow the Angular 2 Tour of Heroes by johnpapa and run npm install.
...
10
votes
1
answer
17k
views
HTTP status code 401 even though I’m sending credentials in the request
Recently i have introduced JWT authentication to my Springboot and Angualr2 based App.
In There i tried to do a POST request by passing the JWT token as below in my Angualr code
save(jobId: ...
10
votes
1
answer
605
views
Can we add a feature module to an Angular app after AOT
I am working on an open source platform, similar to WordPress and other CMS apps, but focusing on interopability with the typical Java build pipeline.
The goal is to create some reusable libraries ...
9
votes
3
answers
4k
views
Angular2 and Spring Boot. How to serve front-end?
I have Spring Boot as back-end and Angular2 as front-end. I want to develop both of them separately and deploy onto Heroku.
They shouldn't have any common dependencies and should be in separate git-...
9
votes
2
answers
36k
views
"Refused to set unsafe header 'Cookie' " while sending cookies with GET request in angular 6
I am using spring security with angular 6. When i login using basic Auth server sends a cookie JessionID with response. I want to send this cookie with other request for authentication purpose but ...
9
votes
3
answers
7k
views
Incompatibile SockJS! Main site uses: "1.1.4", the iframe: "1.0.0". How to deal with that?
I have problem with WebSocket using SpringBoot and Angular2:
Incompatibile SockJS! Main site uses: "1.1.4", the iframe: "1.0.0".
Screenshot: consoleOutput
I think that error (Incompatibile SockJS! ...
9
votes
3
answers
17k
views
CORS issue with Spring Boot
I have a Spring Boot application running on port 8443, and an angular2 based front end on port 8080. I need my front end to make requests to my Spring server, but I'm getting CORS errors left and ...
9
votes
1
answer
8k
views
Step by step guide on how to create a webjar for Front-End Application? [closed]
Hello I've been looking for a step by step guide on how to create a webjar of an existing project. My Front-End project is currently using Angular 2 + webpack, I understand the files need to go in a ...
9
votes
0
answers
14k
views
How To Add SelfSigned Certificate to Chrome / Mozilla
First of all please ignore this question if its too simple or useless.
I am new to TLS and am trying to implement the SSL for my secure data transmission between my client and server. My backend is ...
8
votes
8
answers
31k
views
Cors enabled in Spring Boot with Angular, still cors errors
I have cors enabled for all origins and headers but I still get an cors error when I call a get method from my angular app to spring boot.
Cors error from console:
Access to XMLHttpRequest at 'http://...
8
votes
1
answer
6k
views
Property 'finally' does not exist on type 'Observable<Object>'
I am attempting to make a spring security/angular login/logout and I cannot find out why finally() is not recognized. Any assistance moving forward would be greatly appreciated. Property 'finally' ...
8
votes
3
answers
13k
views
Deploy WAR file on Tomcat of a Spring Boot and Angular app
I created an Angular and Spring Boot application and I want to deploy it on Tomcat server. For that I copied an angular project in a Spring Boot project and also provide a pom.xml to create a WAR file....
8
votes
3
answers
12k
views
how to solve Circular dependency detected using Angular 4?
I am using Angular 4 simple form,Getting error when i compile the project using command line,How to solve the warning.see Error Image 1: https://i.stack.imgur.com/N1AH4.png
> WARNING in ...
8
votes
1
answer
2k
views
Passing error messages from SSE (Webflux) Spring Boot app to Angular 7 frontend
My application is a Spring Boot app with several end points. We are trying to add an SSE enabled endpoint, using Webflux.
Use case :
Step 1: Front-end submits a request to a POST endpoint and gets ...
8
votes
0
answers
9k
views
JWT authentication using httponly cookie with Spring Boot and Angular 5
So, I am developing an Angular 5 app, which requires authentication. Angular app is retrieving data from Spring Boot API. For authentication I send email and password to API which, if correct, sends ...
7
votes
5
answers
11k
views
Spring Boot JWT CORS with Angular 6
I am using JWT in my Spring Boot app. When I try to login from the Angular 6 client, I get the CORS error
Access to XMLHttpRequest at 'http://localhost:8082/login' from origin 'http://localhost:4200' ...
7
votes
3
answers
20k
views
Credential is not supported if the CORS header ‘Access-Control-Allow-Origin’ is ‘*’
My application do some REST request in a java web application. the requests are CORS requests so the browser do every time an OPTION preflight before the real one.
Each request are similar to
Host: ...
7
votes
2
answers
5k
views
Angular routing doesn't work after deploy into a Springboot Application
I have build a Springboot Application including Angluar5. I have a gradle build script which loads the angular files into my springboot project.The files are under resources/static of my springboot ...
7
votes
4
answers
2k
views
Spring Boot 2.6 and Angular in static Resources
My question is very similar to this question that has already been asked and answered but is not 100% up-to-date.
We used the solution from Chris Gaskill for quite some time and it suited us perfectly ...
7
votes
1
answer
7k
views
How to use angular2 with spring boot
I would like to develop an application with angular2 as front end and spring boot as back end. As per my knowledge there are two ways to achive this
1) Create an angular2 app and using rest calls ...
7
votes
2
answers
4k
views
Angular: prevent auto recompile when there is a change in assets folder
I'm trying to download a file generated from spring boot in the assets of the angular project. When I call the spring API from angular services, angular CLI recompiles the project after the creation ...
7
votes
3
answers
5k
views
Kubernetes: ERR_NAME_NOT_RESOLVED
I have deployed a mongo db, Spring Boot BE, Angular app within GKE. My FE service is a load balancer, it needs to connect with my BE to get data but I'm getting an console error in my browser: GET ...
7
votes
4
answers
3k
views
Handling CORS and CSRF between Spring Boot and Angular
I have a Spring Boot back-end application that runs on port 8888 and an Angular front-end app that runs on 4200.
In my Spring Boot application i've defined the following bean to handle CORS:
@Bean
...
6
votes
4
answers
13k
views
Spring boot with Angular. Access to XMLHttpRequest at 'http://localhost:8080/' from origin 'http://localhost:4200' has been blocked by CORS policy
My Angular application is running on http://localhost:4200 port and Spring Boot on http://localhost:8080 port.
When I PUT request from client side I get this error.
I tried to create headers by doing:...
6
votes
1
answer
12k
views
Send JSON and Image with single request. Angular + Spring Boot
Spring Rest Controller
@PostMapping(
value = "/post",
produces = MediaType.APPLICATION_JSON_VALUE,
consumes = {MediaType.APPLICATION_JSON_VALUE, MediaType.MULTIPART_FORM_DATA_VALUE}
)
...