mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
pass checkstyle plugin
This commit is contained in:
parent
16e9494487
commit
de9b1be4be
8
eclipse/checkstyle-suppressions.xml
Normal file
8
eclipse/checkstyle-suppressions.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<!DOCTYPE suppressions PUBLIC
|
||||||
|
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
|
||||||
|
"https://checkstyle.org/dtds/suppressions_1_2.dtd">
|
||||||
|
<suppressions>
|
||||||
|
<suppress files="[\\/]spring-cloud-alibaba-examples[\\/]" checks="HideUtilityClassConstructorCheck" />
|
||||||
|
<suppress files=".*" checks="LineLength" />
|
||||||
|
</suppressions>
|
18
pom.xml
18
pom.xml
@ -282,6 +282,24 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>checkstyle-validation</id>
|
||||||
|
<phase>validate</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<!-- Checkstyle rules inherited from spring-cloud-build -->
|
||||||
|
<suppressionsLocation>eclipse/checkstyle-suppressions.xml</suppressionsLocation>
|
||||||
|
<includeTestSourceDirectory>true</includeTestSourceDirectory>
|
||||||
|
<consoleOutput>true</consoleOutput>
|
||||||
|
<failsOnError>true</failsOnError>
|
||||||
|
<failOnViolation>true</failOnViolation>
|
||||||
|
<violationSeverity>warning</violationSeverity>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
@ -19,7 +19,7 @@ package com.alibaba.cloud.dubbo.autoconfigure;
|
|||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link DubboServiceRegistrationAutoConfiguration} Test
|
* {@link DubboServiceRegistrationAutoConfiguration} Test.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||||
*/
|
*/
|
||||||
|
@ -26,7 +26,7 @@ import org.springframework.core.ResolvableType;
|
|||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link AbstractMediaTypeExpression} Test
|
* {@link AbstractMediaTypeExpression} Test.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||||
*/
|
*/
|
||||||
|
@ -35,6 +35,9 @@ import org.springframework.context.annotation.Bean;
|
|||||||
@SpringBootApplication
|
@SpringBootApplication
|
||||||
public class OssApplication {
|
public class OssApplication {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bucket Name of OSS Example.
|
||||||
|
*/
|
||||||
public static final String BUCKET_NAME = "spring-cloud-alibaba-test";
|
public static final String BUCKET_NAME = "spring-cloud-alibaba-test";
|
||||||
|
|
||||||
public static void main(String[] args) throws URISyntaxException {
|
public static void main(String[] args) throws URISyntaxException {
|
||||||
|
@ -20,14 +20,29 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
public class Order implements Serializable {
|
public class Order implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* order id.
|
||||||
|
*/
|
||||||
public long id;
|
public long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user id.
|
||||||
|
*/
|
||||||
public String userId;
|
public String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* commodity code.
|
||||||
|
*/
|
||||||
public String commodityCode;
|
public String commodityCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* count.
|
||||||
|
*/
|
||||||
public int count;
|
public int count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* money.
|
||||||
|
*/
|
||||||
public int money;
|
public int money;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -20,14 +20,29 @@ import java.io.Serializable;
|
|||||||
|
|
||||||
public class Order implements Serializable {
|
public class Order implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id.
|
||||||
|
*/
|
||||||
public long id;
|
public long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* user id.
|
||||||
|
*/
|
||||||
public String userId;
|
public String userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* commodity code.
|
||||||
|
*/
|
||||||
public String commodityCode;
|
public String commodityCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* count.
|
||||||
|
*/
|
||||||
public int count;
|
public int count;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* money.
|
||||||
|
*/
|
||||||
public int money;
|
public int money;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -25,7 +25,11 @@ import org.springframework.http.client.ClientHttpRequestExecution;
|
|||||||
/**
|
/**
|
||||||
* @author fangjian
|
* @author fangjian
|
||||||
*/
|
*/
|
||||||
public class ExceptionUtil {
|
public final class ExceptionUtil {
|
||||||
|
|
||||||
|
private ExceptionUtil() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static SentinelClientHttpResponse handleException(HttpRequest request,
|
public static SentinelClientHttpResponse handleException(HttpRequest request,
|
||||||
byte[] body, ClientHttpRequestExecution execution, BlockException ex) {
|
byte[] body, ClientHttpRequestExecution execution, BlockException ex) {
|
||||||
|
@ -33,7 +33,7 @@ public class EchoServiceFallback implements EchoService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用服务提供方的输出接口
|
* 调用服务提供方的输出接口.
|
||||||
* @param str 用户输入
|
* @param str 用户输入
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
@ -33,9 +33,9 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|||||||
public interface EchoService {
|
public interface EchoService {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用服务提供方的输出接口
|
* 调用服务提供方的输出接口.
|
||||||
* @param str 用户输入
|
* @param str 用户输入
|
||||||
* @return
|
* @return echo result
|
||||||
*/
|
*/
|
||||||
@GetMapping("/echo/{str}")
|
@GetMapping("/echo/{str}")
|
||||||
String echo(@PathVariable("str") String str);
|
String echo(@PathVariable("str") String str);
|
||||||
|
@ -65,7 +65,7 @@ public class RocketMQBusApplication {
|
|||||||
private ObjectMapper objectMapper;
|
private ObjectMapper objectMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Publish the {@link UserRemoteApplicationEvent}
|
* Publish the {@link UserRemoteApplicationEvent}.
|
||||||
* @param name the user name
|
* @param name the user name
|
||||||
* @param destination the destination
|
* @param destination the destination
|
||||||
* @return If published
|
* @return If published
|
||||||
@ -82,7 +82,7 @@ public class RocketMQBusApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Listener on the {@link UserRemoteApplicationEvent}
|
* Listener on the {@link UserRemoteApplicationEvent}.
|
||||||
* @param event {@link UserRemoteApplicationEvent}
|
* @param event {@link UserRemoteApplicationEvent}
|
||||||
*/
|
*/
|
||||||
@EventListener
|
@EventListener
|
||||||
|
@ -23,7 +23,7 @@ import org.springframework.cloud.config.server.EnableConfigServer;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Nacos Config Server Bootstrap
|
* Nacos Config Server Bootstrap.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||||
* @since 0.2.0
|
* @since 0.2.0
|
||||||
|
@ -24,7 +24,11 @@ import com.alibaba.nacos.api.naming.pojo.Instance;
|
|||||||
/**
|
/**
|
||||||
* @author xiaojing
|
* @author xiaojing
|
||||||
*/
|
*/
|
||||||
public class NacosMockTest {
|
public final class NacosMockTest {
|
||||||
|
|
||||||
|
private NacosMockTest() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static Instance serviceInstance(String serviceName, boolean isHealthy,
|
public static Instance serviceInstance(String serviceName, boolean isHealthy,
|
||||||
Map<String, String> metadata) {
|
Map<String, String> metadata) {
|
||||||
|
@ -37,7 +37,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
|||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add this unit test to verify https://github.com/alibaba/spring-cloud-alibaba/pull/838
|
* Add this unit test to verify https://github.com/alibaba/spring-cloud-alibaba/pull/838.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
||||||
*/
|
*/
|
||||||
|
@ -23,7 +23,11 @@ import com.alibaba.ans.shaded.com.taobao.vipserver.client.core.Host;
|
|||||||
/**
|
/**
|
||||||
* @author xiaojing
|
* @author xiaojing
|
||||||
*/
|
*/
|
||||||
public class AnsMockTest {
|
public final class AnsMockTest {
|
||||||
|
|
||||||
|
private AnsMockTest() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public static Host hostInstance(String serviceName, boolean valid,
|
public static Host hostInstance(String serviceName, boolean valid,
|
||||||
Map<String, String> metadata) {
|
Map<String, String> metadata) {
|
||||||
|
@ -27,7 +27,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
|||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link OSS} {@link OssProperties} Test
|
* {@link OSS} {@link OssProperties} Test.
|
||||||
*
|
*
|
||||||
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
* @author <a href="mailto:fangjian0423@gmail.com">Jim</a>
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user