java - Spring Boot API 错误地重复 SQL 数据

标签 java mysql api maven spring-boot

我有一个来自 Spring-boot 的 API,它可以成功连接到我的 SQL 数据库。 我有一个大型数据集 {224},并且从获取请求中显示的数据重复。

它正确地重复前 7 个项目,然后重复它们,然后正确地添加 15 个插槽,然后混合重复前 7 个项目和剩余插槽的 15 个插槽。

任何对此的帮助将不胜感激,因为我被难住了。 :( 我已经包含了下面可能有帮助的所有代码。

问题是每224张卡的卡数据都不一样,在mysql中是正确的,但是当用GET函数查看springboot API中的数据时,数据重复了卡的第一个元素,即不正确。 mysql 数据中没有任何内容是键,id、imglocation、name 列是唯一的字符串(并且全部不同),但这在 SQL 表中没有说明

Card.java

import javax.persistence.*;

@Entity
@Table(name = "cards")
public class Card {

    @Id

    String clan;
    int cost;
    int decklimit;
    String element;
    int fate;
    int glory;
    int honor;
    String id;
    String imglocation;
    int influencecost;
    int influencepool;
    String isrestricted;
    int military;
    String militarybonus;
    String name;
    int political;
    String politicalbonus;
    String rolerestriction;
    String side;
    int strength;
    String strengthbonus;
    String text;
    String typeof;
    String unicity;

对 getter 和 setter 进行编辑

卡存储库

import org.springframework.data.jpa.repository.JpaRepository;
import com.name.models.Card;

public interface CardRepository extends JpaRepository<Card, String>{


}

application.properties

server.port=9000

spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://{IP-redacted}:3306/{SQL-table-name-redacted}?useSSL=false
spring.datasource.username=redacted
spring.datasource.password=redacted

spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect

卡片 Controller

import com.name.repository.CardRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.name.models.Card;

import java.util.List;

@CrossOrigin
@RestController
public class CardController {

    @Autowired
    private CardRepository repository;

    @RequestMapping(value = "cards", method = RequestMethod.GET)
    public List<Card> listAllCards(){
        return repository.findAll();
    }

MYSQL 表

 Field           | Type         | Null | Key | Default | Extra |
+-----------------+--------------+------+-----+---------+-------+
| clan            | varchar(8)   | NO   |     | NULL    |       |
| cost            | int(11)      | NO   |     | NULL    |       |
| decklimit       | int(11)      | NO   |     | NULL    |       |
| element         | varchar(5)   | NO   |     | NULL    |       |
| fate            | int(11)      | NO   |     | NULL    |       |
| glory           | int(11)      | NO   |     | NULL    |       |
| honor           | int(11)      | NO   |     | NULL    |       |
| id              | varchar(40)  | NO   |     | NULL    |       |
| imglocation     | varchar(80)  | NO   |     | NULL    |       |
| influencecost   | int(11)      | NO   |     | NULL    |       |
| influencepool   | int(11)      | NO   |     | NULL    |       |
| isrestricted    | varchar(5)   | YES  |     | NULL    |       |
| military        | int(11)      | NO   |     | NULL    |       |
| militarybonus   | varchar(2)   | NO   |     | NULL    |       |
| name            | varchar(40)  | NO   |     | NULL    |       |
| political       | int(11)      | NO   |     | NULL    |       |
| politicalbonus  | varchar(2)   | NO   |     | NULL    |       |
| rolerestriction | varchar(6)   | NO   |     | NULL    |       |
| side            | varchar(8)   | NO   |     | NULL    |       |
| strength        | int(11)      | NO   |     | NULL    |       |
| strengthbonus   | varchar(2)   | NO   |     | NULL    |       |
| text            | varchar(500) | YES  |     | NULL    |       |
| typeof          | varchar(10)  | NO   |     | NULL    |       |
| unicity         | varchar(5)   | YES  |     | NULL    |       |

数据

`[{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crane","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"shizuka-toshi","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_2.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shizuka Toshi","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a [conflict-political] conflict, bow this stronghold. Choose a participating character with [conflict-political] skill 2 or lower - bow that character.","typeof":"stronghold","unicity":"true"},`{"clan":"dragon","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"mountain-s-anvil-castle","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_3.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Mountain's Anvil Castle","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a conflict, bow this stronghold. Choose a participating character with 1 or more attachments on it - until the end of the conflict, that character gets +1[conflict-military] and +1[conflict-political] (+2[conflict-military] and +2[conflict-political] instead if it has 2 or more attachments on it).","typeof":"stronghold","unicity":"true"},{"clan":"lion","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":12,"id":"yojin-no-shiro","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_4.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Y?jin no Shiro","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a conflict, bow this stronghold - each attacking character you control gets +1[conflict-military] until the end of the conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"phoenix","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"isawa-mori-seido","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_5.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Isawa Mori Seid?","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> Bow this stronghold, choose a character - that character gets +2 glory until the end of the phase.","typeof":"stronghold","unicity":"true"},{"clan":"scorpion","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"city-of-the-open-hand","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_6.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"City of the Open Hand","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+1","text":"<b>Action:</b> If you are less honorable than an opponent, bow this stronghold and select one - either that opponent loses 1 honor, or you gain 1 honor.\n<i>Errata from RRG v9</i>","typeof":"stronghold","unicity":"true"},`{"clan":"unicorn","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"golden-plains-outpost","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_7.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Golden Plains Outpost","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+0","text":"<b>Action:</b> During a [conflict-military] conflict, bow this stronghold. Choose a <em>Cavalry</em> character you control - move it to that conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"crane","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"shizuka-toshi","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_2.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shizuka Toshi","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a [conflict-political] conflict, bow this stronghold. Choose a participating character with [conflict-political] skill 2 or lower - bow that character.","typeof":"stronghold","unicity":"true"},{"clan":"dragon","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"mountain-s-anvil-castle","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_3.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Mountain's Anvil Castle","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a conflict, bow this stronghold. Choose a participating character with 1 or more attachments on it - until the end of the conflict, that character gets +1[conflict-military] and +1[conflict-political] (+2[conflict-military] and +2[conflict-political] instead if it has 2 or more attachments on it).","typeof":"stronghold","unicity":"true"},`{"clan":"lion","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":12,"id":"yojin-no-shiro","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_4.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Y?jin no Shiro","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a conflict, bow this stronghold - each attacking character you control gets +1[conflict-military] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"phoenix","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"isawa-mori-seido","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_5.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Isawa Mori Seid?","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> Bow this stronghold, choose a character - that character gets +2 glory until the end of the phase.","typeof":"stronghold","unicity":"true"},`{"clan":"scorpion","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"city-of-the-open-hand","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_6.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"City of the Open Hand","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+1","text":"<b>Action:</b> If you are less honorable than an opponent, bow this stronghold and select one - either that opponent loses 1 honor, or you gain 1 honor.\n<i>Errata from RRG v9</i>","typeof":"stronghold","unicity":"true"},{"clan":"unicorn","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"golden-plains-outpost","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_7.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Golden Plains Outpost","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+0","text":"<b>Action:</b> During a [conflict-military] conflict, bow this stronghold. Choose a <em>Cavalry</em> character you control - move it to that conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},`{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},`{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},`{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},`{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},{"clan":"neutral","cost":0,"decklimit":1,"element":"earth","fate":0,"glory":0,"honor":0,"id":"ancestral-lands","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_15.jpg","influencecost":0,"influencepool":0,"isrestricted":"false","military":0,"militarybonus":"","name":"Ancestral Lands","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":5,"strengthbonus":"","text":"This province gets +5 strength during [conflict-political] conflicts.","typeof":"province","unicity":"false"},`{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},`{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crab","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":10,"id":"shiro-nishiyama","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_1.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shiro Nishiyama","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+3","text":"<b>Action:</b> During a conflict, bow this stronghold - each defending character you control gets +1[conflict-military] and +1[conflict-political] until the end of the conflict.","typeof":"stronghold","unicity":"true"},{"clan":"crane","cost":0,"decklimit":1,"element":"","fate":7,"glory":0,"honor":11,"id":"shizuka-toshi","imglocation":"http://lcg-cdn.fantasyflightgames.com/l5r/L5C01_2.jpg","influencecost":0,"influencepool":10,"isrestricted":"false","military":0,"militarybonus":"","name":"Shizuka Toshi","political":0,"politicalbonus":"","rolerestriction":"","side":"province","strength":0,"strengthbonus":"+2","text":"<b>Action:</b> During a [conflict-political] conflict, bow this stronghold. Choose a participating character with [conflict-political] skill 2 or lower - bow that character.","typeof":"stronghold","unicity":"true"}

最佳答案

已解决:

@id 正在选择“clan”而不是“id”。

@Id
    String id;

关于java - Spring Boot API 错误地重复 SQL 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57963004/

相关文章:

java - 链表插入后

java - 如何在 firefox headless(java 中的 selenium)中截取屏幕截图?

php - 我想在 Web 服务器的 mysql 数据库发生更改时发送推送通知。是否可以?

api - 如何让docker在centos下用systemd监听unix和TCP socket

api - 列出过去一年的 Jenkins 作业构建详细信息以及触发构建的用户

c - 需要 API 完整性自动测试帮助

java - Rest 客户端通过 https 与服务器通信

java - Spring MVC : Understanding of view binding

mysql - 使用 Mysql 使用 Express 的 JSON 输出

asp.net - 来自 ASP.NET 2 的 MySQL 存储过程调用抛出 Use Procedure bodies 异常