mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 13:47:09 +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:
|
||||
- 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: |
|
||||
dnf install -y java-1.8.0-openjdk-devel maven
|
||||
java -version
|
||||
mvn -version
|
||||
- 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.UserTokenUtils;
|
||||
import com.tencent.supersonic.common.util.ContextUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -20,6 +21,7 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* DefaultUserAdaptor provides a default method to obtain user and organization information
|
||||
*/
|
||||
@Slf4j
|
||||
public class DefaultUserAdaptor implements UserAdaptor {
|
||||
|
||||
private List<UserDO> getUserDOList() {
|
||||
@@ -76,7 +78,7 @@ public class DefaultUserAdaptor implements UserAdaptor {
|
||||
try {
|
||||
byte[] salt = AESEncryptionUtil.generateSalt(userDO.getName());
|
||||
userDO.setSalt(AESEncryptionUtil.getStringFromBytes(salt));
|
||||
System.out.println("salt: " + userDO.getSalt());
|
||||
log.info("salt: " + userDO.getSalt());
|
||||
userDO.setPassword(AESEncryptionUtil.encrypt(userReq.getPassword(), salt));
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("password encrypt error, please try again");
|
||||
|
||||
Reference in New Issue
Block a user