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>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<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>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
|
@ -19,7 +19,7 @@ package com.alibaba.cloud.dubbo.autoconfigure;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
/**
|
||||
* {@link DubboServiceRegistrationAutoConfiguration} Test
|
||||
* {@link DubboServiceRegistrationAutoConfiguration} Test.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
|
@ -26,7 +26,7 @@ import org.springframework.core.ResolvableType;
|
||||
import org.springframework.http.MediaType;
|
||||
|
||||
/**
|
||||
* {@link AbstractMediaTypeExpression} Test
|
||||
* {@link AbstractMediaTypeExpression} Test.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
*/
|
||||
|
@ -35,6 +35,9 @@ import org.springframework.context.annotation.Bean;
|
||||
@SpringBootApplication
|
||||
public class OssApplication {
|
||||
|
||||
/**
|
||||
* Bucket Name of OSS Example.
|
||||
*/
|
||||
public static final String BUCKET_NAME = "spring-cloud-alibaba-test";
|
||||
|
||||
public static void main(String[] args) throws URISyntaxException {
|
||||
|
@ -20,14 +20,29 @@ import java.io.Serializable;
|
||||
|
||||
public class Order implements Serializable {
|
||||
|
||||
/**
|
||||
* order id.
|
||||
*/
|
||||
public long id;
|
||||
|
||||
/**
|
||||
* user id.
|
||||
*/
|
||||
public String userId;
|
||||
|
||||
/**
|
||||
* commodity code.
|
||||
*/
|
||||
public String commodityCode;
|
||||
|
||||
/**
|
||||
* count.
|
||||
*/
|
||||
public int count;
|
||||
|
||||
/**
|
||||
* money.
|
||||
*/
|
||||
public int money;
|
||||
|
||||
@Override
|
||||
|
@ -20,14 +20,29 @@ import java.io.Serializable;
|
||||
|
||||
public class Order implements Serializable {
|
||||
|
||||
/**
|
||||
* id.
|
||||
*/
|
||||
public long id;
|
||||
|
||||
/**
|
||||
* user id.
|
||||
*/
|
||||
public String userId;
|
||||
|
||||
/**
|
||||
* commodity code.
|
||||
*/
|
||||
public String commodityCode;
|
||||
|
||||
/**
|
||||
* count.
|
||||
*/
|
||||
public int count;
|
||||
|
||||
/**
|
||||
* money.
|
||||
*/
|
||||
public int money;
|
||||
|
||||
@Override
|
||||
|
@ -25,7 +25,11 @@ import org.springframework.http.client.ClientHttpRequestExecution;
|
||||
/**
|
||||
* @author fangjian
|
||||
*/
|
||||
public class ExceptionUtil {
|
||||
public final class ExceptionUtil {
|
||||
|
||||
private ExceptionUtil() {
|
||||
|
||||
}
|
||||
|
||||
public static SentinelClientHttpResponse handleException(HttpRequest request,
|
||||
byte[] body, ClientHttpRequestExecution execution, BlockException ex) {
|
||||
|
@ -33,7 +33,7 @@ public class EchoServiceFallback implements EchoService {
|
||||
}
|
||||
|
||||
/**
|
||||
* 调用服务提供方的输出接口
|
||||
* 调用服务提供方的输出接口.
|
||||
* @param str 用户输入
|
||||
* @return
|
||||
*/
|
||||
|
@ -33,9 +33,9 @@ import org.springframework.web.bind.annotation.PathVariable;
|
||||
public interface EchoService {
|
||||
|
||||
/**
|
||||
* 调用服务提供方的输出接口
|
||||
* 调用服务提供方的输出接口.
|
||||
* @param str 用户输入
|
||||
* @return
|
||||
* @return echo result
|
||||
*/
|
||||
@GetMapping("/echo/{str}")
|
||||
String echo(@PathVariable("str") String str);
|
||||
|
@ -65,7 +65,7 @@ public class RocketMQBusApplication {
|
||||
private ObjectMapper objectMapper;
|
||||
|
||||
/**
|
||||
* Publish the {@link UserRemoteApplicationEvent}
|
||||
* Publish the {@link UserRemoteApplicationEvent}.
|
||||
* @param name the user name
|
||||
* @param destination the destination
|
||||
* @return If published
|
||||
@ -82,7 +82,7 @@ public class RocketMQBusApplication {
|
||||
}
|
||||
|
||||
/**
|
||||
* Listener on the {@link UserRemoteApplicationEvent}
|
||||
* Listener on the {@link UserRemoteApplicationEvent}.
|
||||
* @param event {@link UserRemoteApplicationEvent}
|
||||
*/
|
||||
@EventListener
|
||||
|
@ -23,7 +23,7 @@ import org.springframework.cloud.config.server.EnableConfigServer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
/**
|
||||
* Nacos Config Server Bootstrap
|
||||
* Nacos Config Server Bootstrap.
|
||||
*
|
||||
* @author <a href="mailto:mercyblitz@gmail.com">Mercy</a>
|
||||
* @since 0.2.0
|
||||
|
@ -24,7 +24,11 @@ import com.alibaba.nacos.api.naming.pojo.Instance;
|
||||
/**
|
||||
* @author xiaojing
|
||||
*/
|
||||
public class NacosMockTest {
|
||||
public final class NacosMockTest {
|
||||
|
||||
private NacosMockTest() {
|
||||
|
||||
}
|
||||
|
||||
public static Instance serviceInstance(String serviceName, boolean isHealthy,
|
||||
Map<String, String> metadata) {
|
||||
|
@ -37,7 +37,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
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>
|
||||
*/
|
||||
|
@ -23,7 +23,11 @@ import com.alibaba.ans.shaded.com.taobao.vipserver.client.core.Host;
|
||||
/**
|
||||
* @author xiaojing
|
||||
*/
|
||||
public class AnsMockTest {
|
||||
public final class AnsMockTest {
|
||||
|
||||
private AnsMockTest() {
|
||||
|
||||
}
|
||||
|
||||
public static Host hostInstance(String serviceName, boolean valid,
|
||||
Map<String, String> metadata) {
|
||||
|
@ -27,7 +27,7 @@ import org.springframework.boot.test.context.runner.ApplicationContextRunner;
|
||||
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>
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user