I have a problem when I make a request "http://localhost:8080/main/home" - There was an unexpected error `(type=Internal Server Error, status=500).`

And when a request is "http://localhost:8080/main/add" - There was an unexpected error `(type=Method Not Allowed, status=405).`

My controller class

```
package com.example.transactions.controller;

 import com.example.transactions.model.Transaction;
 import com.example.transactions.repository.TransactionRepository;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;

 import java.util.List;

 @RestController
 @RequestMapping("/main")
 public class TransactionController {

    @Autowired (required = false)
    private TransactionRepository transactionRepository;

    @GetMapping("/home")
    public List<Transaction> getAll(){
        return transactionRepository.findAll();
    }

    @PostMapping("/add")
    public Transaction addTransaction (@RequestParam Transaction transaction ){
        return transactionRepository.save(transaction);
    }
}

```

My Repository class

```
package com.example.transactions.repository;

import com.example.transactions.model.Transaction;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface TransactionRepository extends JpaRepository<Transaction,Integer> {
}

```

Application.properties

```
spring.jpa.show-sql=true
spring.jab.hibernate.ddl-auto=update

spring.datasource.url=jdbc:oracle:thin:@localhost:1521/oracle
spring.datasource.username=sys
spring.datasource.password=chingishan
spring.datasource.initialization-mode=always

```