Skip to content

Commit

Permalink
check style
Browse files Browse the repository at this point in the history
  • Loading branch information
wenshao committed Jun 12, 2022
1 parent 68e2a03 commit 2db8321
Show file tree
Hide file tree
Showing 4,844 changed files with 40,655 additions and 46,637 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Expand Up @@ -11,7 +11,6 @@
@SpringBootApplication
@EnableConfigurationProperties(MonitorProperties.class)
public class DruidAdminApplication {

public static void main(String[] args) {
SpringApplication.run(DruidAdminApplication.class, args);
}
Expand Down
Expand Up @@ -12,7 +12,6 @@
@Data
@ConfigurationProperties(prefix = "monitor")
public class MonitorProperties {

/**
* 需要监控的服务
*/
Expand Down
Expand Up @@ -8,7 +8,6 @@
**/
@Data
public class ServiceNode {

private String id;

private Integer port;
Expand Down
Expand Up @@ -14,7 +14,6 @@
@NoArgsConstructor
@Data
public class ConnectionResult {

@JSONField(name = "ResultCode")
private int ResultCode;
@JSONField(name = "Content")
Expand All @@ -23,7 +22,6 @@ public class ConnectionResult {
@NoArgsConstructor
@Data
public static class ContentBean {

@JSONField(name = "id")
private int id;
@JSONField(name = "connectionId")
Expand Down
Expand Up @@ -13,7 +13,6 @@
@Data
@NoArgsConstructor
public class DataSourceResult {

@JSONField(name = "ResultCode")
private int ResultCode;
@JSONField(name = "Content")
Expand All @@ -22,7 +21,6 @@ public class DataSourceResult {
@NoArgsConstructor
@Data
public static class ContentBean {

private String serviceId;

@JSONField(name = "Identity")
Expand Down
Expand Up @@ -13,7 +13,6 @@
@NoArgsConstructor
@Data
public class SqlDetailResult {

@JSONField(name = "ResultCode")
private int ResultCode;
@JSONField(name = "Content")
Expand Down
Expand Up @@ -13,7 +13,6 @@
@NoArgsConstructor
@Data
public class SqlListResult {

@JSONField(name = "ResultCode")
private int ResultCode;
@JSONField(name = "Content")
Expand All @@ -22,7 +21,6 @@ public class SqlListResult {
@NoArgsConstructor
@Data
public static class ContentBean {

private String serviceId;
private String address;

Expand Down
Expand Up @@ -15,7 +15,6 @@
@Data
@NoArgsConstructor
public class WallResult {

@JSONField(name = "ResultCode")
private int ResultCode;
@JSONField(name = "Content")
Expand Down Expand Up @@ -54,7 +53,6 @@ public static class ContentBean {
@NoArgsConstructor
@Data
public static class TablesBean {

@JSONField(name = "name")
private String name;

Expand Down
Expand Up @@ -13,7 +13,6 @@
@NoArgsConstructor
@Data
public class WebResult {

@JSONField(name = "ResultCode")
private int ResultCode;
@JSONField(name = "Content")
Expand Down
Expand Up @@ -40,12 +40,11 @@
@Slf4j
@Component
public class MonitorStatService implements DruidStatServiceMBean {
public static final int RESULT_CODE_SUCCESS = 1;
public static final int RESULT_CODE_ERROR = -1;

public final static int RESULT_CODE_SUCCESS = 1;
public final static int RESULT_CODE_ERROR = -1;

private final static int DEFAULT_PAGE = 1;
private final static int DEFAULT_PER_PAGE_COUNT = Integer.MAX_VALUE;
private static final int DEFAULT_PAGE = 1;
private static final int DEFAULT_PER_PAGE_COUNT = Integer.MAX_VALUE;
private static final String ORDER_TYPE_DESC = "desc";
private static final String ORDER_TYPE_ASC = "asc";
private static final String DEFAULT_ORDER_TYPE = ORDER_TYPE_ASC;
Expand Down
Expand Up @@ -13,7 +13,6 @@
**/
@Slf4j
public class MonitorViewServlet extends ResourceServlet {

private MonitorStatService monitorStatService;

public MonitorViewServlet() {
Expand Down
Expand Up @@ -16,7 +16,6 @@
* @date 2020-09-16 16:12
**/
public class HttpUtil {

public static <T> T get(String url, Class<T> resultType) {
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet httpGet = new HttpGet(url);
Expand Down
Expand Up @@ -47,7 +47,6 @@
DruidWebStatFilterConfiguration.class,
DruidFilterConfiguration.class})
public class DruidDataSourceAutoConfigure {

private static final Logger LOGGER = LoggerFactory.getLogger(DruidDataSourceAutoConfigure.class);

@Bean(initMethod = "init")
Expand Down
Expand Up @@ -23,7 +23,6 @@
* @author lihengming [89921218@qq.com]
*/
public class DruidDataSourceBuilder {

public static DruidDataSourceBuilder create() {
return new DruidDataSourceBuilder();
}
Expand Down
Expand Up @@ -30,7 +30,6 @@
* @author lihengming [89921218@qq.com]
*/
public class DruidFilterConfiguration {

@Bean
@ConfigurationProperties(FILTER_STAT_PREFIX)
@ConditionalOnProperty(prefix = FILTER_STAT_PREFIX, name = "enabled")
Expand Down
Expand Up @@ -30,7 +30,6 @@
*/
@ConditionalOnProperty("spring.datasource.druid.aop-patterns")
public class DruidSpringAopConfiguration {

@Bean
public Advice advice() {
return new DruidStatInterceptor();
Expand Down
Expand Up @@ -10,7 +10,6 @@
/*@Configuration
@Profile("issue-1796")*/
public class Issue1796Configurer {

@Bean
public DataSource dataSource(Environment environment) {
return DruidDataSourceBuilder
Expand Down
Expand Up @@ -33,7 +33,6 @@
@RunWith(SpringRunner.class)
@SpringBootTest(classes = DemoApplication.class)
public class DruidDataSourceTestCase {

@Resource
private DruidDataSource dataSource;

Expand Down
Expand Up @@ -47,13 +47,11 @@ public void test() {
@Configuration
@ComponentScan
public static class Config{

/**
* @author dk
*/
@Component
public static class SomeCustomFilter extends FilterAdapter {

private static Logger logger = LoggerFactory.getLogger(SomeCustomFilter.class);

@Override
Expand Down
Expand Up @@ -37,15 +37,13 @@
@SpringBootTest(classes = DemoApplication.class)
@ActiveProfiles("multi-datasource")
public class DruidMultiDataSourceTestCase {

@Resource
private DruidDataSource dataSourceOne;
@Resource
private DruidDataSource dataSourceTwo;

@Test
public void testDataSourceOne() throws SQLException {

assertThat(dataSourceOne.getUrl()).isEqualTo("jdbc:h2:file:./demo-db");
assertThat(dataSourceOne.getUsername()).isEqualTo("sa");
assertThat(dataSourceOne.getPassword()).isEqualTo("sa");
Expand All @@ -58,7 +56,6 @@ public void testDataSourceOne() throws SQLException {
}
@Test
public void testDataSourceTwo() throws SQLException {

assertThat(dataSourceTwo.getUrl()).isEqualTo("jdbc:h2:file:./demo-db");
assertThat(dataSourceTwo.getUsername()).isEqualTo("sa");
assertThat(dataSourceTwo.getPassword()).isEqualTo("sa");
Expand Down
Expand Up @@ -3,5 +3,4 @@
import com.alibaba.druid.pool.DruidDataSourceC3P0Adapter;

public class ComboPooledDataSource extends DruidDataSourceC3P0Adapter implements PooledDataSource {

}
Expand Up @@ -4,5 +4,4 @@


public interface PooledDataSource extends DataSource {

}
Expand Up @@ -3,7 +3,6 @@
import com.alibaba.druid.pool.DruidDataSource;

public class BasicDataSource extends DruidDataSource implements BasicDataSourceMBean {

private static final long serialVersionUID = 1L;

}
Expand Up @@ -3,5 +3,4 @@
import com.alibaba.druid.pool.DruidDataSourceMBean;

public interface BasicDataSourceMBean extends DruidDataSourceMBean {

}
@@ -1,7 +1,6 @@
package org.apache.commons.dbcp;

public class ManagedBasicDataSource extends BasicDataSource implements BasicDataSourceMBean {

private static final long serialVersionUID = 1L;

}
Expand Up @@ -5,7 +5,6 @@
import javax.sql.DataSource;

public class ManagedBasicDataSourceFactory extends BasicDataSourceFactory {

public static DataSource createDataSource(Properties properties) throws Exception {
ManagedBasicDataSource dataSource = new ManagedBasicDataSource();
config(dataSource, properties);
Expand Down
Expand Up @@ -2,5 +2,4 @@


public interface ManagedBasicDataSourceMBean extends BasicDataSourceMBean {

}
Expand Up @@ -3,7 +3,6 @@
import com.alibaba.druid.pool.DruidDataSource;

public class BasicDataSource extends DruidDataSource implements BasicDataSourceMBean {

private static final long serialVersionUID = 1L;

}
Expand Up @@ -3,5 +3,4 @@
import com.alibaba.druid.pool.DruidDataSourceMBean;

public interface BasicDataSourceMBean extends DruidDataSourceMBean {

}
Expand Up @@ -7,7 +7,6 @@


public interface ProxoolConstants {

public final String PROXOOL = "proxool";

/**
Expand Down
Expand Up @@ -21,13 +21,11 @@
import com.alibaba.druid.pool.DruidDataSource;

public class ProxoolDataSource implements DataSource, ObjectFactory {

private DruidDataSource druid = new DruidDataSource();

private Properties delegateProperties = new Properties();

public ProxoolDataSource(){

}

public ProxoolDataSource(String alias){
Expand Down Expand Up @@ -110,7 +108,6 @@ public long getMaximumConnectionLifetime() {

@Deprecated
public void setMaximumConnectionLifetime(int maximumConnectionLifetime) {

}

@Deprecated
Expand All @@ -120,7 +117,6 @@ public int getPrototypeCount() {

@Deprecated
public void setPrototypeCount(int prototypeCount) {

}

public int getMinimumConnectionCount() {
Expand Down Expand Up @@ -152,23 +148,20 @@ public int getSimultaneousBuildThrottle() {
}

public void setSimultaneousBuildThrottle(int simultaneousBuildThrottle) {

}

public long getRecentlyStartedThreshold() {
return 0;
}

public void setRecentlyStartedThreshold(int recentlyStartedThreshold) {

}

public long getOverloadWithoutRefusalLifetime() {
return 0;
}

public void setOverloadWithoutRefusalLifetime(int overloadWithoutRefusalLifetime) {

}

public long getMaximumActiveTime() {
Expand All @@ -185,7 +178,6 @@ public boolean isVerbose() {

@Deprecated
public void setVerbose(boolean verbose) {

}

public boolean isTrace() {
Expand Down Expand Up @@ -216,15 +208,13 @@ public String getFatalSqlExceptionsAsString() {

@Deprecated
public void setFatalSqlExceptionsAsString(String fatalSqlExceptionsAsString) {

}

public String getFatalSqlExceptionWrapperClass() {
return null;
}

public void setFatalSqlExceptionWrapperClass(String fatalSqlExceptionWrapperClass) {

}

public String getHouseKeepingTestSql() {
Expand Down Expand Up @@ -256,7 +246,6 @@ public boolean isJmx() {
}

public void setJmx(boolean jmx) {

}

@Deprecated
Expand All @@ -266,7 +255,6 @@ public String getJmxAgentId() {

@Deprecated
public void setJmxAgentId(String jmxAgentId) {

}

public boolean isTestBeforeUse() {
Expand Down

0 comments on commit 2db8321

Please sign in to comment.