1
0
mirror of https://gitee.com/mirrors/Spring-Cloud-Alibaba.git synced 2021-06-26 13:25:11 +08:00

example annotations clearer

This commit is contained in:
赵禹光
2019-08-23 15:36:31 +08:00
parent 00835121cb
commit 3eb75988e3
16 changed files with 53 additions and 67 deletions

View File

@@ -20,6 +20,7 @@ import java.util.Random;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@@ -45,7 +46,7 @@ public class AccountController {
this.random = new Random();
}
@RequestMapping(value = "/account", method = RequestMethod.POST, produces = "application/json")
@PostMapping(value = "/account", produces = "application/json")
public String account(String userId, int money) {
LOGGER.info("Account Service ... xid: " + RootContext.getXID());