mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
format code with maven plugins
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2019 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -23,7 +23,6 @@ import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
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.RequestParam;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@@ -61,4 +60,5 @@ public class BusinessApplication {
|
||||
@RequestParam("orderCount") int orderCount);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2019 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -16,8 +16,12 @@
|
||||
|
||||
package com.alibaba.cloud.examples;
|
||||
|
||||
import com.alibaba.cloud.examples.BusinessApplication.OrderService;
|
||||
import com.alibaba.cloud.examples.BusinessApplication.StorageService;
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import org.springframework.http.HttpEntity;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.MediaType;
|
||||
@@ -25,16 +29,9 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.util.LinkedMultiValueMap;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import com.alibaba.cloud.examples.BusinessApplication.OrderService;
|
||||
import com.alibaba.cloud.examples.BusinessApplication.StorageService;
|
||||
|
||||
import io.seata.spring.annotation.GlobalTransactional;
|
||||
|
||||
/**
|
||||
* @author xiaojing
|
||||
*/
|
||||
@@ -44,13 +41,19 @@ public class HomeController {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(HomeController.class);
|
||||
|
||||
private static final String SUCCESS = "SUCCESS";
|
||||
|
||||
private static final String FAIL = "FAIL";
|
||||
|
||||
private static final String USER_ID = "U100001";
|
||||
|
||||
private static final String COMMODITY_CODE = "C00321";
|
||||
|
||||
private static final int ORDER_COUNT = 2;
|
||||
|
||||
private final RestTemplate restTemplate;
|
||||
|
||||
private final OrderService orderService;
|
||||
|
||||
private final StorageService storageService;
|
||||
|
||||
public HomeController(RestTemplate restTemplate, OrderService orderService,
|
||||
|
@@ -1,11 +1,11 @@
|
||||
/*
|
||||
* Copyright (C) 2019 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@@ -19,10 +19,15 @@ package com.alibaba.cloud.examples;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class Order implements Serializable {
|
||||
|
||||
public long id;
|
||||
|
||||
public String userId;
|
||||
|
||||
public String commodityCode;
|
||||
|
||||
public int count;
|
||||
|
||||
public int money;
|
||||
|
||||
@Override
|
||||
@@ -30,4 +35,5 @@ public class Order implements Serializable {
|
||||
return "Order{" + "id=" + id + ", userId='" + userId + '\'' + ", commodityCode='"
|
||||
+ commodityCode + '\'' + ", count=" + count + ", money=" + money + '}';
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -5,4 +5,4 @@ spring.application.name=business-service
|
||||
#feign.hystrix.enabled=true
|
||||
#feign.sentinel.enabled=true
|
||||
|
||||
logging.level.io.seata=debug
|
||||
logging.level.io.seata=debug
|
||||
|
Reference in New Issue
Block a user