我在使用 Powershell 和 CMD 时遇到问题。当我尝试在 CMD 中执行 Angular CLI 命令(例如ng --version或 )时ng new projectName,出现此错误;
Windows 脚本宿主错误:无效字符
代码:800A03F6
来源:Microsoft JScript 编译错误

我正在尝试将 POST 方法发送到 mongoDB,但我得到 Cannot autogenerate id of type java.lang.Long for entity of type Entity
这是我的实体:
@Data
@AllArgsConstructor
@Document(collection = "TaxesLine")
public class TaxesligneEntity {
@Id
private Long taxesLigneId;
private Date dateReception;
private String label;
private int nbrLignes;
private int nbrOperationW;
private int nbrOperationV;
private BigDecimal initalSol;
private BigDecimal finalSol;
private List<LigneEntity> lignes;
public TaxesligneEntity(){
super();
}
}
Run Code Online (Sandbox Code Playgroud)
这是我的 POST 方法:
{
"taxesLigneId": 1200,
"dateReception": "2022-03-04T01:17:59.344Z",
"label": "5488",
"nbrLignes": 541,
"nbrOperationW": 4521,
"nbrOperationV": 5421,
"initalSol": 541,
"finalSol": 0,
"lignes": [ …Run Code Online (Sandbox Code Playgroud)