Currently, I am in the process of developing a project that consists of a springboot backend and Vue frontend. At this point, I have successfully managed to retrieve a list of products from my database using GET requests. While I can display this list on a ...
I am attempting to retrieve and display data from a MySQL database using Spring Boot and React JS in a table format. However, I am encountering an error while trying to display the information. componentDidMount(){ const currentUser = AuthService.g ...
Presenting the User entity: package com.yogesh.juvenilebackend.Model; import jakarta.annotation.Generated; import jakarta.persistence.*; import lombok.*; @Entity @Getter @Setter @NoArgsConstructor @AllArgsConstructor @RequiredArgsConstructor public class ...
As I work on constructing a REST API, I've come across multiple methods for returning JSON data. However, I am seeking the most effective approach that is scalable over time and can manage many-to-many relationships, along with deep relations such as Artic ...
I am currently trying to send a POST request using ReactJS and update data in a Mongo database with Spring Boot. Although I didn't encounter any errors during code compilation, I'm facing an issue where there is no output when attempting the POST ...
In my project, I have created two classes named Car.java and Bus.java. Car.java private Property property; Bus.java private Property property; The Property.java class contains attributes for number and colour. ...
Greetings everyone, I am currently in the process of securing my spring boot application with HTTP only cookies, transitioning from local storage. However, I have encountered some challenges along the way that even chatGPT couldn't resolve :) Let&apo ...
To fulfill the requirements of my project, I am tasked with exporting customer data into an Excel file. Utilizing a table structure using Hibernate build. Here is my controller code: @RequestMapping(value="exporttoexcel", method= RequestMethod.GET, prod ...
I am facing an issue with sending data from my Angular application to SpringBoot. The problem arises when the server does not receive the correct object that is being sent. Upon checking the console.log output for what is being sent to the server, everyth ...
Exploring JHipster, the Spring Boot + AngularJS application generator based on Yeoman has been an interesting and fun experience. Setting up a vanilla webapp was relatively easy. Now, the goal is to separate entities, repositories, and services from the o ...
Currently, I am involved in a jhipster project that utilizes both bower and npm. We have decided to phase out the use of bower and transition to npm packages. Is there a way for me to migrate from bower to npm using npm exclusively, without resorting to ...
I am currently working on integrating ReactJS and Java Spring Boot applications, both protected by Keycloak 11.0.2. Keycloak is running on port 8083, ReactJS on port 3000, and the Spring Boot application on port 8085. However, when I attempt to utilize th ...
I am currently facing the following scenario: //--class user -- private .... @OneToMany(targetEntity = UserRoles.class, mappedBy = "iduser", fetch = FetchType.LAZY) @JsonManagedReference private List<UserRoles> userRoleList = new ArrayList<>( ...
In my ReactJs client, I have a form with multiple radio inputs and one textarea input that I submit using axios. The code for the request is as follows: axios.post("/wellbeing/" + params.wellbeingSurveyType, { formAnswersJson: formAnswers }) ...
My goal is to redirect the request to the edit page if the server response status is failed. The updated code below provides more clarity with changed variable names and IDs for security reasons. Controller: @Controller @RequestMapping("abc") public clas ...
In my project, I am utilizing angular4 for the frontend and a spring boot application for the backend. The communication between the frontend and BFF (backend for frontend) is done via RESTful requests. When the frontend sends a POST request to the backen ...
Our goal is to include some variables in the JSON response, embedded within a specific aspect. We are looking to implement a process similar to this function, but focusing on modifying the response rather than the request. ...
As a Korean, please excuse my lack of proficiency in English. This image displays the autocomplete feature for HTML files in IntelliJ. This particular file was generated by Spring Boot (start.spring.io). How can I achieve the same in VSCode? ...
Hey there! I'm encountering a bit of an issue with sending some data as a JSON object. The problem arises when trying to send images using FormData. It seems like I need to convert my form data into a single JSON object. Can anyone assist me with this? Tha ...
My project involves an app with Vue.js on the frontend and Spring-boot on the backend. I am looking to perform "unit testing" or integration testing of my views by utilizing a browser and Selenium, while also mocking API calls (ajax requests). What tools ...
I need to verify the JSON request I receive from the client side. Despite successfully using annotations like @notnull and @length(min=1,max=8), I am struggling to access the specific fields and error messages that are triggered when validation fails. Alth ...
I am interested in receiving a JSON response with additional annotations. Currently, my JSON response looks like: { "id": 1, "startDate": [ 1993, 12, 12 ], "endDate": [ 2018, 11, 22 ], "totalDistance": 255, "totalPrice": 211 } How ...
Whenever I make the following request: "Person": { "name": 5 } The request will fail as it is a bad request since 5 is not a string. It displays: Person{name='5'}. Similarly, no error occurs when null is sent. The annot ...
As I contemplate developing a food ordering application similar to Zomato, I have observed that Angular-like routing is used on certain pages, specifically during the ordering process after selecting a restaurant. Unlike other sections where server routing ...
I'm currently working on an AngularJS project using Spring Boot, with the HTML/JS/CSS stored in src/main/resources/static. The issue I am facing is that when I make changes to these files outside of Eclipse and then refresh the browser, the changes d ...
After developing a small application using Angular and an API with Spring Boot that includes an embedded Tomcat server, I decided to deploy them on a Raspberry Pi while configuring an SSL certificate with Let's Encrypt. The deployment process involved ins ...
I am currently working on a Spring Boot application with a React front end. In my project, I have node dependencies managed by package.json and Spring Boot dependencies handled by Gradle. As I prepare to build a jar for my production environment, I am unc ...
I am facing an issue where the values in my dropdown list are changing to null when I click on the form. The add function is working correctly, but this update problem is bothering me. Can anyone provide assistance? Below is the snippet of my HTML code: ...
I am attempting to make a Spring Boot controller call from an Ajax Request: $('#female').click(function(){ $('#analysisTable').DataTable( { "ajax": '/analyse/female' }); }); The purpose of this is to populate a list within a js datatable. Th ...
In my current project, I am implementing Angular and Spring Boot technologies. When I build the project, Angular generates the service worker for me. The issue arises when I use an external service (auth2) and my backend redirects to the login page after ...
This question has been circulating on various platforms, but this one is a bit unique. I encountered an error while attempting to access a Java API using axios with the following code: axios .get("http://127.0.0.1:8090/api/v1/homescreen") .the ...
I started a fresh springboot project and organized the directory structure as follows: view image description here The yml configuration is outlined below: server: port: 8783 servlet: context-path: /spring-demo spring: scan : com.example appli ...
My Java web application makes CORS requests where the browser performs an OPTIONS preflight before the actual request. The format of each request is as follows: Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:63.0) Gecko/2 ...
I'm facing some challenges with deserializing JSON into Java objects within a Spring Boot 1.5 application using Jackson. Below is an example of the JSON response, which is an array containing a single JSON object with nested attributes: [ { "deploy ...
I need assistance with implementing a function to send map data to a Spring Controller via ajax. However, I am encountering an issue where the received map data from the controller is empty. The size of the map is currently 0... Please help me resolve t ...
Currently, I am using a Spring Boot restful server alongside an Angular2 front-end application. In an attempt to streamline the process, I have been trying to host the front-end files on Tomcat in order to avoid serving them separately. Unfortunately, desp ...
I have developed an application using Ionic 3 that connects to a Spring Boot API for user authentication. The Spring Boot application is hosted on AWS and the functionality works perfectly on Android devices. However, when testing it on iOS, I encountered ...
Here is an example of a JSON data structure: "name": { "title": "Mr", "firstName": "somename", "middleName": "middleName", "lastName": "Micheal", "maid ...
I am brand new to working with Spring Boot. Currently, I am attempting to send registration form data (in JSON format) from a Vue frontend to a Spring Boot backend. However, the backend always indicates that the received data is null. How can I properly re ...
After creating an ArrayList with the JSON values from a Rest API, I encountered the following code to read the Rest API: @RestController public class exemploclass { @RequestMapping(value="/vectors") ...
I need to develop a service that only returns JSON with date, time, and minutes, but the current implementation is displaying everything including milliseconds and seconds in the timestamp. How can I remove the milliseconds and seconds from the output? Be ...
Currently, I am facing an issue while trying to upload photos into the database as I keep encountering error 403. Interestingly, everything was functioning smoothly when I tested the endpoint using POSTMAN. However, upon creating the axios request, the err ...
I keep running into a Whitelabel Error Page (error 404) whenever I attempt to access any page on my Angular 9 application, except for the root route. Interestingly, using the page buttons within the Angular router functions perfectly fine. Despite trying ...
Is it possible to detect in Spring REST if the input JSON contains a parameter multiple times? For example, if we have the following controller: @PostMapping("/") public void handle(@RequestBody Id id) { ... } Where the object Id is a classic POJO pub ...
After successfully developing a controller and service in the backend using Spring, I have managed to implement file upload functionality on the server. To determine the upload location, I utilized System.getProperty("user.dir") to retrieve the current pr ...
Having thoroughly reviewed all the MDN documentation on CORS, I am attempting to retrieve resources from a Spring Boot server at localhost:8080 within a ReactJS application at localhost:3000. However, I am not receiving the expected response. Here is the c ...
I am looking to utilize Ajax to send data to a RestController using the POST method for processing, and then return the resulting list back to Ajax. Controller @Controller public class AjaxController { @GetMapping("/web") public String web() ...
Is it possible to run NextJs code on a different port like 3000, and have it combined with Springboot in an executable Jar/WAR (with embedded Tomcat) running on default port 8080? Can the combined application jar/war be configured to run on a single port? ...
I'm following a tutorial similar to this one. The setup involves a pom file that manages two modules, the frontend module and the backend module. Tools being used: IDE: Intellij, spring-boot, Vue.js I initialized the frontent module using vue init webpac ...
I've been attempting to submit a form using the following method: saveBuildcompany(): void { // @ts-ignore // @ts-ignore console.log(this.group?.value); let data2=this.group.value; let serializedForm = JSON.stringify(data2); ...
When testing my Spring Boot application, I realized that querying one of my REST endpoints with an invalid token using Postman resulted in a response content in HTML format instead of JSON. The endpoint correctly responded with 401 InvalidTokenException, b ...
As I try to implement a login and session management system for my library portal, I have developed backend services using Spring Boot and frontend with Angular. While exploring an example of Spring Boot + Session Management on this link: , I made some adj ...
I am currently working on building a REST API using spring boot with React as the frontend. The goal is for React to send GET or POST requests from the frontend in order to make modifications to the MySQL DB located in the backend through the REST API. W ...
I am currently running on Spring Boot version 1.5.10.RELEASE, but I'm facing issues with Gzip compression not working correctly. When accessing http://localhost:9000, it redirects to http://localhost:8080/api/.. My AngularJS and REST API are on dif ...
I am currently working on a project that includes the following code snippet: @SessionScope @RestController public class cdaDisplayTool { private final static Logger LOG = LoggerFactory.getLogger(cdaDisplayTool.class); @PostMapping(path = "/d ...
Exploring the utilization of login roles in my Angular SPA application which operates solely on the client side, integrated with Spring Security and Spring Boot. I have concerns about potential unauthorized access by a skilled developer who could manipula ...
I am attempting to implement a feature in my Nextjs frontend where users can download a list as an Excel file by clicking on a button. The backend of my application is built using Spring Boot, and I need to send the file from there so that users can downlo ...
Currently engaged in a Spring Boot project utilizing Materialize CSS for the frontend. Everything runs smoothly when running the HTML file independently, with the Materialize CSS multiple select feature working perfectly. However, upon integrating the HTML ...
Is there a way to pass parameters from ModelAndView to a window.onload function in JavaScript within an HTML file? Here is an example of how it can be done: @RequestMapping(value = "/admin/printtext") public ModelAndView printtext() { ModelAndView mo ...
I have implemented a CORS filter class in my Spring Boot application: @Component public class CorsingFilter { @Bean public CorsFilter corsFilter() { final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); ...
Hello, I am new to Kotlin and apologize for my poor English. I am trying to convert the code snippet below to Kotlin. However, I am having trouble finding the equivalent of [JsonExtensiondata] in Kotlin. public class ProofAttribute { [JsonProperty(&q ...
I have created two Java classes named Request and Item: public class Request { private List<Item> subItems; public Request() { } public List<Item> getSubItems() { return subItems; } public void setSub ...
After developing a Spring Boot / Angular JS app, I am now looking to implement GUI interface tests. I decided to utilize the Selenium ChromeDriver, so I included the Selenium dependency : <dependency> <groupId>org.seleniumhq.selenium</ ...
I am facing an issue with my Spring controller method that requires a @RequestBody as a parameter. The structure of the request body class is like this: public class myClass { CustomObject obj int x int y int[] values Character c ...
When trying to upload a file using spring boot and vue, I encountered an error '415 : Unsupported MediaType'. This is the snippet of my spring boot controller. @PostMapping(consumes = {MediaType.MULTIPART_FORM_DATA_VALUE}, produces = {MediaType.APPLICATIO ...
I am currently working on constructing a spring boot/angular application. My goal is to run it locally in order to work on the front end login/logout process. To do this, I have angular set up to run on port 4200 and spring boot running on port 8080. How ...
As I work on developing a Restful API with JSON responses, I have enabled Https by default for security reasons. However, whenever I attempt to access endpoints using the http protocol, I receive a 400 error message indicating: Bad Request This combinati ...
Encountering an issue: I have a Spring Boot API set up with various endpoints and a filter to determine access with or without a JSON Web Token. Postman works as expected, returning the correct data, but React seems to struggle with it. The root cause of t ...
Is there anyone who can assist me in extracting data in a JSON format like this: {"EMPLOYEE_DETAILS":"1-abc_xyz"} instead of the default format like {"id":1, "firstName":"abc", "lastName":"xyz"}? The data should be retrieved from a specific column. For i ...
For my Karate Integration testing, I am looking to set randomString/randomNumber as Json values instead of hardcoded ones for the payload using the PUT HTTP verb. Additionally, I would like to store these JSON values in a database. ...