Skip to content

Commit

Permalink
Update some dependencies' version
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarrett committed Nov 10, 2024
1 parent 77805da commit 13e4705
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 34 deletions.
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<artifactId>document-sharing-site</artifactId>
<version>1.0-SNAPSHOT</version>
<name>all-docs</name>
<description>使用Mongodb作为文件上传服务器</description>
<description>all docs project.</description>

<properties>
<java.version>1.8</java.version>
Expand Down Expand Up @@ -43,7 +43,7 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.4.3</version>
<version>5.8.25</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
Expand All @@ -53,7 +53,7 @@
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.79</version>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
Expand Down Expand Up @@ -198,7 +198,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.jiaruiblog.DocumentSharingSiteApplication</mainClass>
<mainClass>com.jiaruiblog.AllDocsApplication</mainClass>
</configuration>
</plugin>
</plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,16 @@


/**
* //@EnableAsync(proxyTargetClass=true)
* //@EnableAsync
* //@EnableTransactionManagement(proxyTargetClass = true)
* @ClassName DocumentSharingSiteApplication
* @Description SpringBoot application
* @Author luojiarui
* @Date 2022/6/2 10:58 下午
* @Version 1.0
* <p>DocumentSharingSiteApplication</p>
* @author luojiarui
**/
@EnableAsync(proxyTargetClass=true)
@ServletComponentScan(basePackages = "com.jiaruiblog.filter")
@SpringBootApplication
public class DocumentSharingSiteApplication {
public class AllDocsApplication {

public static void main(String[] args) {
SpringApplication.run(DocumentSharingSiteApplication.class, args);
SpringApplication.run(AllDocsApplication.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.jiaruiblog.util.network;

import java.net.InetAddress;

public class InternetConnectionChecker {
public static boolean isInternetAvailable() {
try {
// 尝试解析 Google 的域名
InetAddress address = InetAddress.getByName("github.com");
// 如果能返回地址,说明可以连接到互联网
return address.isReachable(2000); // 超时设置为 2 秒
} catch (Exception e) {
return false; // 出现异常说明无法连接互联网
}
}

public static void main(String[] args) {
if (isInternetAvailable()) {
System.out.println("Can connect to the Internet.");
} else {
System.out.println("Cannot connect to the Internet.");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Lists;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.common.MessageConstant;
import com.jiaruiblog.entity.dto.RefuseBatchDTO;
import com.jiaruiblog.entity.dto.RefuseDTO;
Expand Down Expand Up @@ -30,7 +30,7 @@
import java.util.Map;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class DocReviewControllerTest {

private MockMvc mockMvc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.jiaruiblog.controller;

import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -24,7 +24,7 @@
//测试环境使用,用来表示测试环境使用的ApplicationContext将是WebApplicationContext类型的
@WebAppConfiguration
@PropertySource(value = "classpath:application.xproperties")
@SpringBootTest(classes = {DocumentSharingSiteApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.NONE)
@SpringBootTest(classes = {AllDocsApplication.class}, webEnvironment = SpringBootTest.WebEnvironment.NONE)
public class DocumentControllerTest {

private MockMvc mockMvc;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.jiaruiblog.controller;

import com.alibaba.fastjson.JSON;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.common.MessageConstant;
import com.jiaruiblog.config.SystemConfig;
import org.junit.After;
Expand All @@ -24,7 +24,7 @@
import java.nio.charset.Charset;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class SystemConfigControllerTest {

private MockMvc mockMvc;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.common.MessageConstant;
import com.jiaruiblog.entity.dto.RegistryUserDTO;
import com.jiaruiblog.entity.dto.UserDTO;
Expand All @@ -29,7 +29,7 @@
import java.util.Date;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class UserControllerTest {

private MockMvc mockMvc;
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/jiaruiblog/service/CategoryServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.service.impl.CategoryServiceImpl;
import org.junit.Assert;
import org.junit.Test;
Expand All @@ -14,7 +14,7 @@


@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class CategoryServiceTest {

@Resource
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.jiaruiblog.service.impl;

import com.alibaba.fastjson.JSON;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.entity.dto.BasePageDTO;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -10,7 +10,7 @@
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class CommentServiceImplTest {

@Autowired
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.entity.FileDocument;
import com.jiaruiblog.entity.dto.DocumentDTO;
import com.jiaruiblog.enums.FilterTypeEnum;
Expand All @@ -20,7 +20,7 @@


@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class FileServiceImplTest {

@Before
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.jiaruiblog.service.impl;

import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.service.LikeService;
import com.jiaruiblog.task.like.UserLikeDetail;
import org.apache.commons.lang3.RandomStringUtils;
Expand All @@ -14,7 +14,7 @@


@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class LikeServiceImplTest {

@Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import com.jiaruiblog.service.StatisticsService;
import org.junit.Assert;
import org.junit.Test;
Expand All @@ -13,7 +13,7 @@
import javax.annotation.Resource;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class StatisticsServiceImplTest {

@Resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.jiaruiblog.DocumentSharingSiteApplication;
import com.jiaruiblog.AllDocsApplication;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -12,7 +12,7 @@
import javax.annotation.Resource;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = DocumentSharingSiteApplication.class)
@SpringBootTest(classes = AllDocsApplication.class)
public class TagServiceImplTest {

@Resource
Expand Down

0 comments on commit 13e4705

Please sign in to comment.