包@Produces(javax.ws.rs.core. MediaType.APPLICATION_JSON)
中是否有org.springframework.web.bind.annotation
的等效注释,以免混合使用?正如我现在所做的那样......
@PostMapping("/price-menu")
@Produces(javax.ws.rs.core. MediaType.APPLICATION_JSON)
public ResponseEntity<Currency> menus
(HttpServletRequest request) {
..
}
答案 0 :(得分:1)
@PostMapping有一个名为using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using WebApplication3.Models;
namespace WebApplication3
{
public partial class Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
int resultAdd= Calculations.Add(new int[3] { 1, 2, 3 });
int resultSubstract= Calculations.Subtract(new int[3] { 1, 2, 3 });
int resultDivide= Calculations.Divide(new int[3] { 1, 2, 3 });
int resultMultiply=Calculations.Multiply(new int[3] { 1, 2, 3 });
}
}
}
的参数。 (https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/bind/annotation/PostMapping.html#produces--)
您可以像这样使用它:using (DocX doc = DocX.Load(path/to/file.docx)){
Table table = doc.Tables[0];
var ocurrences = doc.FindAll("text", RegexOptions.IgnoreCase);
}