mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
(improvement)(build) Fixed the issue of unable to download JDK on CentOS. (#1118)
This commit is contained in:
15
.github/workflows/centos-ci.yml
vendored
15
.github/workflows/centos-ci.yml
vendored
@@ -16,9 +16,20 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Install Java and Maven
|
- name: Reset DNF repositories
|
||||||
|
run: |
|
||||||
|
cd /etc/yum.repos.d/
|
||||||
|
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*
|
||||||
|
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*
|
||||||
|
- name: Update DNF package index
|
||||||
|
run: dnf makecache
|
||||||
|
- name: Install Java and Maven with retry
|
||||||
|
run: |
|
||||||
|
for i in {1..5}; do
|
||||||
|
dnf install -y java-1.8.0-openjdk-devel maven && break || sleep 15
|
||||||
|
done
|
||||||
|
- name: Verify Java and Maven installation
|
||||||
run: |
|
run: |
|
||||||
dnf install -y java-1.8.0-openjdk-devel maven
|
|
||||||
java -version
|
java -version
|
||||||
mvn -version
|
mvn -version
|
||||||
- name: Cache Maven packages
|
- name: Cache Maven packages
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import com.tencent.supersonic.auth.authentication.persistence.repository.UserRep
|
|||||||
import com.tencent.supersonic.auth.authentication.utils.AESEncryptionUtil;
|
import com.tencent.supersonic.auth.authentication.utils.AESEncryptionUtil;
|
||||||
import com.tencent.supersonic.auth.authentication.utils.UserTokenUtils;
|
import com.tencent.supersonic.auth.authentication.utils.UserTokenUtils;
|
||||||
import com.tencent.supersonic.common.util.ContextUtils;
|
import com.tencent.supersonic.common.util.ContextUtils;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -20,6 +21,7 @@ import java.util.stream.Collectors;
|
|||||||
/**
|
/**
|
||||||
* DefaultUserAdaptor provides a default method to obtain user and organization information
|
* DefaultUserAdaptor provides a default method to obtain user and organization information
|
||||||
*/
|
*/
|
||||||
|
@Slf4j
|
||||||
public class DefaultUserAdaptor implements UserAdaptor {
|
public class DefaultUserAdaptor implements UserAdaptor {
|
||||||
|
|
||||||
private List<UserDO> getUserDOList() {
|
private List<UserDO> getUserDOList() {
|
||||||
@@ -76,7 +78,7 @@ public class DefaultUserAdaptor implements UserAdaptor {
|
|||||||
try {
|
try {
|
||||||
byte[] salt = AESEncryptionUtil.generateSalt(userDO.getName());
|
byte[] salt = AESEncryptionUtil.generateSalt(userDO.getName());
|
||||||
userDO.setSalt(AESEncryptionUtil.getStringFromBytes(salt));
|
userDO.setSalt(AESEncryptionUtil.getStringFromBytes(salt));
|
||||||
System.out.println("salt: " + userDO.getSalt());
|
log.info("salt: " + userDO.getSalt());
|
||||||
userDO.setPassword(AESEncryptionUtil.encrypt(userReq.getPassword(), salt));
|
userDO.setPassword(AESEncryptionUtil.encrypt(userReq.getPassword(), salt));
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new RuntimeException("password encrypt error, please try again");
|
throw new RuntimeException("password encrypt error, please try again");
|
||||||
|
|||||||
Reference in New Issue
Block a user