Spirng boot ile bir bmi hesaplayan Rest Apı geliştirmiştim. Fakat istenilen şey bir arayüz olmasıymış(Veri girme kısımları buton kısımları vs.) Yani postman kabul edilmiyormuş. Yardımcı olur musun? Kodları atıyorum: 1-UserController:package com.example.bmi.SpringApp.Controller;

import com.example.bmi.SpringApp.Entitiy.MyUser;
import com.example.bmi.SpringApp.bmi.BmiCategory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.example.bmi.SpringApp.repo.UserRepository;

import java.time.LocalDate;
import java.util.List;

@RestController
@RequestMapping("/api/users")
public class UserController {

@Autowired
    private UserRepository userRepository;

    @PostMapping
    public MyUser addUser(@RequestBody MyUser user) {
        user.setDate(LocalDate.now());
        double bmi = user.getWeight() / Math.pow(user.getHeight(), 2);
        user.setIndexResult(bmi);
        user.setIndexRange(BmiCategory.findByValue(bmi).toString());
        return userRepository.save(user);
    }

    @GetMapping
    public List<MyUser> getAllUsers() {
        return userRepository.findAll();
    }

    @GetMapping("/{id}/bmi")
            public BmiCategory getUserBMI(@PathVariable Long id) {
            MyUser user = userRepository.findById(id).orElseThrow(
            () -> new IllegalArgumentException("Invalid user ID: " + id)
    );
            Double bmi = user.getWeight() / Math.pow(user.getHeight(), 2);
            return BmiCategory.findByValue(bmi);
            }
}
2- MyUser sınıfı: package com.example.bmi.SpringApp.Entitiy;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.util.Date;

@Data
@Entity
public class MyUser implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;
    private String name;
    private String surname;
    private LocalDate dateOfBirth;
    private String gender;
    private Double weight;
    private Double height;

    private LocalDate date;
    private Double indexResult;
    private String indexRange;

}  Bmı Category:package com.example.bmi.SpringApp.bmi;

public enum BmiCategory {
    SEVERE_THINNESS("Severe Thinness", 0, 16),
    MODERATE_THINNESS("Moderate Thinness", 16, 17),
    MILD_THINNESS("Mild Thinness", 17, 18.5),
    NORMAL("Normal", 18.5, 25),
    OVERWEIGHT("Overweight", 25, 30),
    OBESE_CLASS_I("Obese Class I", 30, 35),
    OBESE_CLASS_II("Obese Class II", 35, 40),
    OBESE_CLASS_III("Obese Class III", 40, Double.MAX_VALUE);

    private final String name;
    private final double lowerBound;
    private final double upperBound;

    BmiCategory(String name, double lowerBound, double upperBound) {
        this.name = name;
        this.lowerBound = lowerBound;
        this.upperBound = upperBound;
    }


    public String getName() {
        return name;
    }

    public double getLowerBound() {
        return lowerBound;
    }

    public double getUpperBound() {
        return upperBound;
    }


    public static BmiCategory findByValue(double value) {
        if (value < 16) return SEVERE_THINNESS;
        if (value >= 16 && value < 17) return MODERATE_THINNESS;
        if (value >= 17 && value < 18.5) return MILD_THINNESS;
        if (value >= 18.5 && value < 25) return NORMAL;
        if (value >= 25 && value < 30) return OVERWEIGHT;
        if (value >= 30 && value < 35) return OBESE_CLASS_I;
        if (value >= 35 && value < 40) return OBESE_CLASS_II;
        return OBESE_CLASS_III;
    }
}
