skip to Main Content

Javascript – Spring server cannot get data from FetchAPI error 403

I have such function to retrieve data from my form and send them to Spring Boot server function saveDataToStorage(event){ event.preventDefault(); let name = document.getElementById('imie').value; let email = document.getElementById('email').value; let phone = document.getElementById('telefon').value; let topic = document.getElementById('temat').value; let message = document.getElementById('wiadomosc').value;…

VIEW QUESTION

Reactjs – can someone help me understand why my api is not working?

So i have this register api created @PostMapping("/register") public ResponseEntity<String> register(@RequestBody RegisterRequest registerRequest){ if (userRepository.findByEmail(registerRequest.getEmail())!=null){ return new ResponseEntity<>("Email already exist",HttpStatus.BAD_REQUEST); } User user = new User(); user.setEmail(registerRequest.getEmail()); user.setName(registerRequest.getName()); user.setLastName(registerRequest.getLastName()); user.setPassword(passwordEncoder.encode(registerRequest.getPassword())); userRepository.save(user); authenticationManager.authenticate( new UsernamePasswordAuthenticationToken(registerRequest.getEmail(), registerRequest.getPassword()) ); return new ResponseEntity<>(jwtUtil.generateToken( registerRequest.getEmail(),…

VIEW QUESTION

spring-boot-starter-data-redis "data.mapping.Parameter does not have a name error" when upgrade spring boot from 3.1 to 3.2

After updating Spring Boot from 3.1 to 3.2, I followed the instructions to add the -parameters flag for Java compilation. Despite this, I'm still encountering the same error, indicated by the stack trace I received. **org.springframework.data.mapping.MappingException: Parameter org.springframework.data.mapping.Parameter@57ced0b5 does not…

VIEW QUESTION

Why can't get a connection to Cassandra running on Docker from a Spring Boot instace using spring-boot-starter-data-cassandra on first boot?

I have the following cassandra: image: cassandra:latest ports: - 9042:9042 volumes: - ./cassandra/image:/var/lib/cassandra environment: - CASSANDRA_AUTHENTICATOR=AllowAllAuthenticator - CASSANDRA_AUTHORIZER=AllowAllAuthorizer The cassandra instance networking looks like this... "Networks": { "cbusha-infra_default": { "IPAMConfig": null, "Links": null, "Aliases": [ "cbusha-infra-cassandra-1", "cassandra", "572f0770b41e" ], "MacAddress":…

VIEW QUESTION
Back To Top
Search