Questions tagged [spring-boot]

Get the most out of your web application by leveraging Spring Boot framework. Use the Spring Boot tag to ask questions about its various features such as configuration, web server embedding, metrics setup, health checks, and externalized configuration. Remember, this tag is not meant for queries regarding the web server itself, Java code execution, or standard spring components. To enhance your chances of getting the best response, make sure you also add relevant tags specific to your question.

HttpErrorResponse: unexpected internal server error

Just getting started with Angular 6. I created a post service using Spring Boot, and it works perfectly when tested with Postman. But testing it in a web browser results in the following error: HttpErrorResponse {headers: HttpHeaders, status: 500, statusT ...

When the Fetch response displays a 401 Unauthenticated error, it typically indicates an issue with authentication in a React frontend

For a university assignment, I developed a Spring Boot backend that requires authorization/authentication. The API functions correctly when tested standalone through Postman requests with the correct authentication/authorization. However, when attempting t ...

The element type provided is incorrect: it should be a string or a class/function, but an object was given instead

Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object. I'm currently working on an application using React JS with Spring Boot. I have successfully configured webpack, but I am ...

Encountered an issue when parsing JSON in Spring Boot: Unable to deserialize the

I'm encountering issues when trying to submit the form. Despite making changes in RoominfoController to accommodate arrays, the problem persists. Cannot deserialize value of type `com.example.pgfinder.models.RoomInfo` from Array value (token `JsonToke ...

Is there a way to transform the XML output from Roku TV's API into JSON format?

I've been working on developing an application that interacts with the Roku TV ECP API commands. One specific call I'm attempting to make retrieves a list of all installed channels and returns it in XML format. However, every time I make this API call, I e ...

How should I structure my MySQL tables for efficiently storing a user's preferences in a map format?

My current project involves developing a web application that provides administrators with the ability to manage user information and access within the system. While most user details like name, email, and workID are straightforward, I am facing difficulty ...

Issues with ngRoute integration in Spring Boot framework

My current project involves developing a Single Page Application with Spring Boot and Angular JS. I have configured the Rest Controller, Index page, and several HTML pages. However, upon running the application, there seems to be an issue - Spring Boot is ...

The process of downloading an image from Spring Boot using VueJs and displaying it within an <img> tag

I have created a Spring Boot backend with a Vue frontend. I am having issues when trying to download and display an image from Google Cloud Storage in my application. Sometimes the downloaded image appears to be cut off, as if not all bytes were sent. Howe ...

What is the best way to convert a JSON string received from Angular into a Java Object within a Spring

I am currently utilizing WebSocket to create a chat application. Below is the code from my Angular application that sends a MessageModel object to the backend after converting it into a JSON string: sendMessage(message: MessageModel){ let data = JSON.str ...

Using RestTemplate to retrieve JSON data with GET request

Currently, I am working on developing a test unit for the GET method that relies on a JSON payload to retrieve results based on the provided data in JSON format. This is what I have attempted: User user = new User(); user.setUserId(userId); ResponseEnt ...

Obtaining a distinct movie identification (tmdb API) utilizing '@PathParam'

I recently started working on my first spring boot project, but I feel like I still have a lot to learn. Despite searching on Stack Overflow and Googling for answers, I haven't found a solution yet. It would be greatly appreciated if someone could provide ...

What is the best method for transferring updated data from the frontend to the backend without needing to store any unchanged values?

After importing a list from a database using axios and storing it in a variable called tasks, each object may resemble the following structure: tasks: [ { title: 'some text here' }, { completed: false }, ] If there are 2000 or 3000 of ...

How can one effectively monitor the advancement of a file transfer operation?

Looking at integrating a Spring Boot REST API with an Angular Frontend, I am interested in monitoring file upload/download progress. I recently came across an informative article that dives into the implementation details of this feature. The approach see ...

Why does Apache keep saying GET not supported when I am trying to use the Post Method?

I am currently developing a small web/application to practice my skills in Spring Boot and Ajax. The web page I have includes a form with two date inputs, 'start date' and 'end date'. My goal is to send the user input to a RestController and display the r ...

When a request body containing a non UTF-8 character is received, it results in a JSON parse error displaying the message: "Invalid UTF-8 start byte 0

Encountering an exception while trying to parse the JSON request body, The issue arises from a special character "®" (non UTF-8) in the request body, leading to parsing failure. How can one effectively handle non UTF-8 characters within the req ...

Is it possible for three.js to integrate information from REST APIs?

Currently, I am in the process of learning three.js and have successfully created basic 3D models using hardcoded values. My goal now is to retrieve these values from a database that I have set up in MSSQL Server. These x, y, and z parameters are stored ...

React+vite application is unable to establish a WebSocket connection with a Spring Boot backend server

My React + Vite application is running on localhost:5173 port, while my Spring Boot is running on localhost:5729. Here is the code snippet from the App.jsx: import { useState } from 'react' import './App.css' function App() { const [list, setList] = use ...

Tips for sending an Object within a multipart/form-data request in Angular without the need for converting it to a string

To successfully pass the object in a "multipart/form-data" request for downstream application (Java Spring) to receive it as a List of custom class objects, I am working on handling metadata objects that contain only key and value pairs. Within the Angula ...

After transitioning an application to Spring Boot and implementing Spring Data Rest, I noticed that entity properties annotated with @Id are no longer included in the JSON marshalling process

Looking for some help regarding an issue related to a specific question on Stack Overflow (Spring boot @ResponseBody doesn't serialize entity id). I recently migrated my application to Spring Boot and started using the spring-boot-starter-data-rest de ...

Encountered a connection error in the Spring Boot application: net::ERR_CONNECTION_REF

Currently working on a school project developing a Spring Boot application using Restful. The application runs smoothly locally, but when deployed to AWS, I am encountering an "net::ERR_CONNECTION_REFUSED" error for all my GET and POST requests sent to the ...

Error message indicating that the REST service response encountered an issue with java.io.IOException: UT010029 where the stream was

Having trouble with JSON conversion in a Spring Boot application? @Lob @Column(name = "attachment") private byte[] attachment; Are you encountering an exception like the following while working with REST services? If so, you may be facing issues with ...

Utilizing a Spring Kafka listener to consume JSON data and automatically determine the corresponding domain object

I have a project where I need to process various types of JSON messages that will be published. Unfortunately, I cannot modify the publisher's code to include any headers. However, I am interested in utilizing @KafkaHandler to manage these different J ...

The request method 'PUT' is not currently supported

Currently, I am working on a project that involves springboot, angularjs, and restful services. Here is my REST controller: @RequestMapping(value="/updatestructure/{ch}", method = RequestMethod.PUT) public @ResponseBody Structurenotification updateStruct ...

Is there a more efficient method for showcasing model objects in Thymeleaf rather than utilizing a form?

I've been exploring Spring Boot, Thymeleaf, and frontend development in general. Currently, I have a frontend table that displays a list of objects from the backend, along with a form to allow users to view properties of each item in the list. However, I ...

Uploading Multiple Parts to Spring REST API with Angular Factory Service and $resource Module

I am currently using AngularJS to interact with a RESTful web service (which is powered by spring boot) via $resource. My goal is to upload files and send form fields in a single multipart post request, but I encountered the following error: When trying ...

Jackson encountered difficulty in the conversion of JSON to a list of maps

In my spring-boot application, I have a controller that looks like this: @RequestMapping(path = { "/multiCommunication" }, consumes = { MediaType.APPLICATION_JSON_VALUE }, method = RequestMethod.POST) ResponseEntity<Object> multiCommunicatio ...

Discovering the Java Map's value in Typescript

My application's backend is built using Spring Boot and the frontend is Angular 7. I need to send a map as a response, like this: Map<String, Object> additionalResponse = new HashMap<>() { { put("key1"," ...

Combining Angular 4 with a pre-existing Spring Boot web app utilizing JSP components

Currently, I have a live Spring Boot web application that uses jsp and JavaScript. My goal is to gradually update existing pages with Angular when time allows. While I am new to Angular, most of the information I have come across suggests that it require ...

What methods can be used to protect an application with spring boot and angular 8 without requiring users to log in?

I am looking to enhance security for an application that leverages angular 8 and spring boot 5. Currently, the application is free form and does not require login to access the UI. Although I have implemented CSRF protection, it is still possible for som ...

Error: Unexpected character "<" found in JSON data at position 3 while using Ionic 2

I encountered an error in Ionic 2 that says "SyntaxError: Unexpected token < in JSON at position 3". The JSON format is correctly structured using spring boot. Here is the spring boot code: Your assistance is highly appreciated. @RequestMapping(value="/ ...

Having trouble sending an object from a form using Ajax in SpringMVC

How can I send an object to a controller using jQuery's AJAX? I have defined the User object: private String name; private int age; public User(String name, int age) { this.name = name; this.age = age; } public String getName() { return nam ...

Guide to retrieving PDFs and images from a Spring Application as an API response and manipulating the data using JS/React

For my current project, I am working on a Spring Boot and React application where I need to create an API that takes the file name as input and returns the file content in Java/Spring Boot. The goal is to display the content in a new browser tab. Below is ...

Building a web application with Spring Boot while incorporating the use of Selenium WebDriver

As I delve into the realm of spring boot, I find myself facing a challenge in integrating selenium into my application. The goal is to create a basic web page with an input box and button. Users should be able to enter a URL in the input box, which will th ...

What steps should I take to resolve the issue with my various layouts in Thymleaf?

Encountering an issue while trying to incorporate another fragment from a layout page that contains two fragments. One is for the header and the other for a post form. Including just the first one results in a problem, but adding the second one leads to tw ...

What causes a delay in HTTP calls in Chrome when it is in the "Stalled" or "Initial Connection" state? Is it possible for these states to generate multiple threads for the same request?

My application uses Angular on the client side and Java (Spring Boot) on the backend. Occasionally, during some network calls, the waterfall chart gets stuck in either the "Stalled" or "Initial Connection" state. When this happens, I have noticed in my log ...

Discovering Spring Boot Properties Within Angular Application

Situation: One microservice is built using Spring Boot and Angular 8. In the Spring Boot application, there is a properties file called application.yaml with the following content: url-header: http gateway: host: envHost:envPort ui-endpoints: g ...

The REST API seems to be functioning correctly when accessed through Postman, but there are issues when attempting to call

When I include @PreAuthorize("hasRole('ROLE_SUPER_ADMIN')") in my controller and make a call from Angular, it doesn't work. However, it works fine when called from Postman. @GetMapping("/getAllOrgniz") @PreAuthorize("hasRole('ROLE_SUPE ...

Customizing the context-path of the React app, achieve Sprig Boot and React bundling as a WebJar

I have developed a Spring Boot backend application integrated with a React frontend (BFF). I followed the standard spring boot setup from spring initialiser and utilized create-react-app to generate the frontend. Everything is working smoothly so far. To b ...

Guide on how to send JSON data embedded within an object using Spring Boot

Within my Spring Boot controller, I have an endpoint that retrieves data in a complex structure: public ResponseEntity<Map<String, Map<String, Object>>> getComplexStructure() The inner Object within this structure is stored as raw JSON s ...

Ways to retrieve the data received from an axios.post request in the server-side code

Currently, I am working on a project that involves using React for the frontend and Spring Boot for the backend. However, I am facing an issue with retrieving data that I have sent using Axios from the frontend to the backend. The code snippet below show ...

Preflight request response failed access control check due to absence of 'Access-Control-Allow-Origin' header

I encountered an error while attempting to upload a file and store it in a database using Angular4 as the front end. Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the ...

Refreshing a Thymeleaf table dynamically without having to reload the entire page

I am currently using the Thymeleaf attribute to render data, but I am now looking to add a "Search" button without reloading the page. Within the attribute departments, I am rendering a List<Department> from the database. While I understand how to a ...

Create a new ArrayList in Spring Boot by using the @RequestBody annotation

Here is the code snippet I am working with: @RequestMapping(value = "/checkInventory", consumes = "application/json", method = RequestMethod.POST) @ResponseBody public ResponseEntity<?> checkInventory ( // HEADERS @RequestBody CheckInventory ...

The "405 method not supported" exception pops up exclusively for Angular/HTML/JSP resources within a Spring Boot application

My Spring Boot and AngularJS application is encountering an issue when trying to access a REST service with a POST method. Interestingly, I am able to successfully hit the service wherever POST is configured for request mapping. However, when attempting t ...

Issues arise when using the select element

Struggling with submitting my list of items from a select in AngularJS. This is my first time posting here and I'm still finding my way around. The issue lies in using ng-repeat in my HTML to display all items. When the screen loads, it only shows: {{list ...

«IntelliJ: Effortless Live Reload with Spring Boot and Angular»

For my software development projects, I often work with a spring boot maven project alongside an Angular 5 project. To optimize the workflow, I usually start by building the "dist" folder using the npm run build:prod command and then incorporating it into ...

Problem with JSON in Spring Boot REST API

Within my spring boot rest application, there is a controller containing the method below. This method utilizes hibernate to retrieve data from an Oracle DB. The problem arises when I call this service, as it returns a HTTP ERROR 500. Strangely, no error ...

Retrieve JSON web token from HTTP header following backend SAML2 authentication

I am facing a challenge in my Angular application where I need to read the JWT from the HTTP header after being redirected from the backend. Here is an overview of my authentication process: Once the user logs in successfully on the web browser, a POST r ...

Having trouble reaching the link using my controller in a jhipster application

I've been working on a project with jhipster and recently created a test controller to check if everything is functioning properly. Take a look at my test controller code: @RestController @Configuration public class TestController { private static fi ...

Easy steps to include HTTP authentication headers in Spring Boot

I have been customizing my spring boot authorization server to fit my needs. Upon logging in with a username and password from my custom HTML page, I am aiming to redirect back to the /oauth/token endpoint to retrieve the access token. While this process ...

angular application encountering an error 404 with proxy redirection issue

I've been working on building an angular spring boot application. Below is the request I'm making: getListProduitImmobilierDTO(pagesize: number, page: number, search: Search): Observable<ProduitImmobilierDTO[]> { const headerDict = { 'C ...

Addressing the data transfer issue between Spring framework and Next.js using Axios

For my upcoming project, I am considering using a combination of Spring and Next.js. In the past, I have worked on projects using Spring and React. I find the API/route structure in Next.js 13 version to be quite intriguing compared to traditional React ...

What could be the reason behind Cesium viewer's failure to show a model after I upload it?

My application features a 3D map of a city with an "Add building" button. Upon clicking this button, a model of a building should be inserted into the map. However, all I see is a selection marker at the intended location without the actual building appea ...

I am experiencing an issue with my post method where I am not receiving any data back from the

I am using a POST method to send data to the server and I want to receive data back after that. When I subscribe to the post method: this.categoryService.storeCategory(this.currentFileUpload, this.category).subscribe(category => { console.log(" ...

What are the steps to activate the hot-swapping feature for HTML and JavaScript files in IntelliJ's Community edition?

Just starting out with IntelliJ to work on an AngularJS project with spring-boot as the backend server. Every time I make changes to my HTML or JavaScript code, I find myself needing to restart the app server. Is there a configuration setting or plugin ava ...

Checking the dimensions and information of a JSON collection - a step-by-step guide

Recently, I've encountered a JSON String that was returned with an array inside in my Java SpringBoot application. {... "downlineLevels": ["01","02","03","04","05","06","07"] } Unfortunately, only the following JUnit tests have passed. 1) .andExpec ...

Error encountered while parsing JSON data with Gson: MalformedJsonException

Hello, I am working on a project that involves parsing JSON data. However, I keep encountering a Malformed exception while trying to do so. Below is the code I'm currently using: Object listOfGroups = sthService.getSthList(); Gson gson = new ...

What is the best way to handle parsing a JSON object in a single response?

My challenge lies in parsing/converting a GET response to a POJO. Below, I have the User class and the Controller class. In the getUsers() method, I successfully parse the request using ParameterizedTypeReference with the wrapper class. However, I face di ...

Sending documents to the folder within Jhipster

I'm currently working on developing a file uploader for both the back and front end components of an application created with jhipster 4.0.0 and AngularJS. I've noticed that jhipster allows for creating blob type columns using the entities builde ...

The view named 'HelloWorld' could not be found within the servlet named 'dispatcherServlet'

I have recently started learning Spring Boot. My goal is to display an HTML page, but unfortunately I am facing some issues. When I change HelloWorld.html to HelloWorld.ftl, I am able to display the FTL page. However, the vue.js file is not being resolve ...

Spring Boot Ajax Parse Error - issue with returning object to Ajax success function

When I make a jQuery ajax call to my Spring controller, I am trying to send back an object to fill out a form in an iziModal. The data gets sent from the browser to the controller and runs through the method, but then I hit a roadblock. I'm having tro ...

Does MySQL Workbench automatically convert camel case attributes?

I'm curious to understand something. I defined an attribute called userId, but in MySQL Workbench it shows up as user_id. Is this usual? @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name= "userId") private Lon ...

The Java Spring and Angular 7 application is missing a necessary file request component

I am facing an issue with the POST method in Angular 6. I am trying to send an image to the server. When I test it using Postman, my Spring Boot application works perfectly and saves the image on the server. However, when I attempt to send the image from m ...

Spring Boot is having trouble identifying the JavaScript files

I've incorporated Spring Boot in my project and I'm working with a JSP file that looks like this: <%@ include file="common/header.jsp" %> <%@ include file="common/navigation.jsp" %> <div class="container"> <p&g ...

Combining Power BI with Spring Angular for Seamless Integration

I am in the process of building a web platform with Spring and Angular. One important element I want to include is Power Bi integration, allowing me to generate datasets and reports using Spring and display charts in Angular. Are there any resources or t ...

The Excel document became corrupted after downloading through a ReactJs jQuery ajax post request

Attempting to download a file using jQuery AJAX post request from ReactJs, with an express router middleware layer utilizing the Request API to send requests to a Spring Boot REST API. The flow goes like this: AJAX => Express POST route => Spring Boot API. ...

Efficient Inter-service Communication Utilizing a Common Object Layer for Request and Response Handling

Currently, I am working on a distributed system that is built on Spring Boot with communication between services being handled by REST API calls. With more than 8 services in place, I am looking to create a common communication layer or library for all of ...

Maximizing Performance: Enhancing Nested For Loops in Angular with Typescript

Is there a way to optimize the iteration and comparisons in my nested loop? I'm looking to improve my logic by utilizing map, reduce, and filter to reduce the number of lines of code and loops. How can I achieve this? fill() { this.rolesPermiAdd = []; ...

Ensuring a User has an Image in MySQL Using Angular 6

As part of my development process, I am working on creating a new user and sending their information along with an image to a MySQL database. The process involves sending a user object with form data through the following component.ts file: subscribeUser() ...

Creating a nested JSON response with an Array in a Stored Procedure

I have extracted a dataset from a stored procedure result +------+--------+---------------------+------------+ | Line |Status | Consent | tid | +------+--------+---------------------+------------+ | 1001 | 1 | Yes | ...

What is the superior choice for developing a REST API for an online bookstore: SpringBoot with MySQL or ExpressJS with MongoDB?

Greetings to you all! I am new to the world of web programming and excited to develop my very own e-commerce Bookstore. My expertise includes ReactJS, ExpressJS, Spring MVC, MongoDB, and Mysql. I have successfully completed projects such as Personal Diary, ...

Experiencing a Cross-Origin Resource Sharing (CORS) error when attempting to establish a connection between a Spring Boot application and React, and

I've encountered an issue with my deployment setup involving a React application on NGINX running on port 9000 and a Spring Boot WAR file deployed on Tomcat server on port 8081. Despite enabling global CORS in Spring Boot, I'm still facing difficulties as ...

Casting user-defined data types to JSON objects can be achieved using the `jason.simple` library

I'm facing an issue with type casting a user-defined data type, USERS, into a JSON Object. When I tried using .toString() to convert Users into a String, the output was unexpected and incorrect. I then considered converting it into a JSON Object and r ...

Encountering a Spring Boot 403 Forbidden Error while attempting to access the web application (index.html) as well as the ReactJS app

I have added the index.html file to my spring boot application's 'src/main/resources/static' folder so that I can access the web page while running the server. This setup works fine in another spring boot application without the configuration of spring web ...

Tips on managing a GET request sent using axios with special characters and accents

When constructing a web page using VUE.JS, a GET request is made with Axios. In the form fields, special characters and accents may be present depending on the user's input. For instance, if the surname entered in the form field is 'Ruíz' ...