remove lombok, update scripts threads
This commit is contained in:
-26
@@ -1,26 +0,0 @@
|
||||
package com.baeldung.loadtesting;
|
||||
|
||||
import com.baeldung.loadtesting.model.Transaction;
|
||||
import com.baeldung.loadtesting.repository.TransactionRepository;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@Deprecated
|
||||
public class TransactionController {
|
||||
|
||||
@Autowired
|
||||
private TransactionRepository transactionRepository;
|
||||
|
||||
@PostMapping(path="/addTransaction")
|
||||
public @ResponseBody
|
||||
String saveTransactions(@RequestBody Transaction trnsctn){
|
||||
transactionRepository.save(trnsctn);
|
||||
return "Saved Transaction.";
|
||||
}
|
||||
|
||||
@GetMapping(path="/findAll/{rewardId}")
|
||||
public @ResponseBody Iterable<Transaction> getTransactions(@RequestParam Integer id){
|
||||
return transactionRepository.findByCustomerRewardsId(id);
|
||||
}
|
||||
}
|
||||
+14
-3
@@ -5,10 +5,7 @@ import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class CustomerRewardsAccount {
|
||||
|
||||
@Id
|
||||
@@ -19,4 +16,18 @@ public class CustomerRewardsAccount {
|
||||
public Integer getCustomerId(){
|
||||
return this.customerId;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setCustomerId(Integer customerId) {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+30
-3
@@ -1,7 +1,5 @@
|
||||
package com.baeldung.loadtesting.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
@@ -10,7 +8,6 @@ import java.util.Date;
|
||||
import java.util.Calendar;
|
||||
|
||||
@Entity
|
||||
@Data
|
||||
public class Transaction {
|
||||
|
||||
@Id
|
||||
@@ -27,4 +24,34 @@ public class Transaction {
|
||||
public void setTransactionDate(Date transactionDate){
|
||||
this.transactionDate = transactionDate;
|
||||
}
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getCustomerRewardsId() {
|
||||
return customerRewardsId;
|
||||
}
|
||||
|
||||
public void setCustomerRewardsId(Integer customerRewardsId) {
|
||||
this.customerRewardsId = customerRewardsId;
|
||||
}
|
||||
|
||||
public Integer getCustomerId() {
|
||||
return customerId;
|
||||
}
|
||||
|
||||
public void setCustomerId(Integer customerId) {
|
||||
this.customerId = customerId;
|
||||
}
|
||||
|
||||
public Date getTransactionDate() {
|
||||
return transactionDate;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user