You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by mi...@apache.org on 2018/10/29 07:48:13 UTC

[incubator-dubbo-ops] branch develop updated: update Configuration

This is an automated email from the ASF dual-hosted git repository.

min pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo-ops.git


The following commit(s) were added to refs/heads/develop by this push:
     new efaa006  update Configuration
efaa006 is described below

commit efaa00600e64faae5a7465aebcba15c7c5bf10b7
Author: nzomkxia <z8...@gmail.com>
AuthorDate: Mon Oct 29 15:48:00 2018 +0800

    update Configuration
---
 .../org/apache/dubbo/admin/config/I18nConfig.java  |   5 -
 .../governance/service/impl/UserServiceImpl.java   | 266 ++++++++++-----------
 ...n-develop.properties => application.properties} |   0
 3 files changed, 133 insertions(+), 138 deletions(-)

diff --git a/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/config/I18nConfig.java b/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/config/I18nConfig.java
index fae1e00..a2016ac 100644
--- a/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/config/I18nConfig.java
+++ b/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/config/I18nConfig.java
@@ -17,7 +17,6 @@
 
 package org.apache.dubbo.admin.config;
 
-import org.springframework.beans.factory.annotation.Value;
 import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
@@ -34,12 +33,8 @@ import java.util.Locale;
 @Configuration
 @EnableAutoConfiguration
 @ComponentScan
-//@ImportResource({"classpath*:dubbo-admin.xml"})
 public class I18nConfig implements WebMvcConfigurer {
 
-    @Value("${spring.profiles.active}")
-    private String activeProfile;
-
     @Bean
     public LocaleResolver localeResolver() {
         SessionLocaleResolver sessionLocaleResolver = new SessionLocaleResolver();
diff --git a/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/governance/service/impl/UserServiceImpl.java b/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/governance/service/impl/UserServiceImpl.java
index b6fd76a..01a6b24 100644
--- a/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/governance/service/impl/UserServiceImpl.java
+++ b/dubbo-admin-backend/src/main/java/org/apache/dubbo/admin/governance/service/impl/UserServiceImpl.java
@@ -1,133 +1,133 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.dubbo.admin.governance.service.impl;
-
-import org.apache.dubbo.admin.governance.service.UserService;
-import org.apache.dubbo.admin.registry.common.domain.User;
-import org.apache.dubbo.admin.registry.common.util.Coder;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Component;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * IBatisUserService
- *
- */
-@Component
-public class UserServiceImpl extends AbstractService implements UserService {
-
-    @Value("${spring.root.password}")
-    private String rootPassword;
-    @Value("${spring.guest.password}")
-    private String guestPassword;
-
-    public void setRootPassword(String password) {
-        this.rootPassword = (password == null ? "" : password);
-    }
-
-    public void setGuestPassword(String password) {
-        this.guestPassword = (password == null ? "" : password);
-    }
-
-    public User findUser(String username) {
-        if ("guest".equals(username)) {
-            User user = new User();
-            user.setUsername(username);
-            user.setPassword(Coder.encodeMd5(username + ":" + User.REALM + ":" + guestPassword));
-            user.setName(username);
-            user.setRole(User.GUEST);
-            user.setEnabled(true);
-            user.setLocale("zh");
-            user.setServicePrivilege("");
-            return user;
-        } else if ("root".equals(username)) {
-            User user = new User();
-            user.setUsername(username);
-            user.setPassword(Coder.encodeMd5(username + ":" + User.REALM + ":" + rootPassword));
-            user.setName(username);
-            user.setRole(User.ROOT);
-            user.setEnabled(true);
-            user.setLocale("zh");
-            user.setServicePrivilege("*");
-            return user;
-        }
-        return null;
-    }
-
-    public List<User> findAllUsers() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public Map<String, User> findAllUsersMap() {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public User findById(Long id) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-    public void createUser(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void updateUser(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void modifyUser(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public boolean updatePassword(User user, String oldPassword) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    public void resetPassword(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void enableUser(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void disableUser(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public void deleteUser(User user) {
-        // TODO Auto-generated method stub
-
-    }
-
-    public List<User> findUsersByServiceName(String serviceName) {
-        // TODO Auto-generated method stub
-        return null;
-    }
-
-}
+///*
+// * Licensed to the Apache Software Foundation (ASF) under one or more
+// * contributor license agreements.  See the NOTICE file distributed with
+// * this work for additional information regarding copyright ownership.
+// * The ASF licenses this file to You under the Apache License, Version 2.0
+// * (the "License"); you may not use this file except in compliance with
+// * the License.  You may obtain a copy of the License at
+// *
+// *     http://www.apache.org/licenses/LICENSE-2.0
+// *
+// * Unless required by applicable law or agreed to in writing, software
+// * distributed under the License is distributed on an "AS IS" BASIS,
+// * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// * See the License for the specific language governing permissions and
+// * limitations under the License.
+// */
+//package org.apache.dubbo.admin.governance.service.impl;
+//
+//import org.apache.dubbo.admin.governance.service.UserService;
+//import org.apache.dubbo.admin.registry.common.domain.User;
+//import org.apache.dubbo.admin.registry.common.util.Coder;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.stereotype.Component;
+//
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * IBatisUserService
+// *
+// */
+//@Component
+//public class UserServiceImpl extends AbstractService implements UserService {
+//
+////    @Value("${spring.root.password}")
+////    private String rootPassword;
+////    @Value("${spring.guest.password}")
+////    private String guestPassword;
+//
+//    public void setRootPassword(String password) {
+//        this.rootPassword = (password == null ? "" : password);
+//    }
+//
+//    public void setGuestPassword(String password) {
+//        this.guestPassword = (password == null ? "" : password);
+//    }
+//
+//    public User findUser(String username) {
+//        if ("guest".equals(username)) {
+//            User user = new User();
+//            user.setUsername(username);
+//            user.setPassword(Coder.encodeMd5(username + ":" + User.REALM + ":" + guestPassword));
+//            user.setName(username);
+//            user.setRole(User.GUEST);
+//            user.setEnabled(true);
+//            user.setLocale("zh");
+//            user.setServicePrivilege("");
+//            return user;
+//        } else if ("root".equals(username)) {
+//            User user = new User();
+//            user.setUsername(username);
+//            user.setPassword(Coder.encodeMd5(username + ":" + User.REALM + ":" + rootPassword));
+//            user.setName(username);
+//            user.setRole(User.ROOT);
+//            user.setEnabled(true);
+//            user.setLocale("zh");
+//            user.setServicePrivilege("*");
+//            return user;
+//        }
+//        return null;
+//    }
+//
+//    public List<User> findAllUsers() {
+//        // TODO Auto-generated method stub
+//        return null;
+//    }
+//
+//    public Map<String, User> findAllUsersMap() {
+//        // TODO Auto-generated method stub
+//        return null;
+//    }
+//
+//    public User findById(Long id) {
+//        // TODO Auto-generated method stub
+//        return null;
+//    }
+//
+//    public void createUser(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public void updateUser(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public void modifyUser(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public boolean updatePassword(User user, String oldPassword) {
+//        // TODO Auto-generated method stub
+//        return false;
+//    }
+//
+//    public void resetPassword(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public void enableUser(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public void disableUser(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public void deleteUser(User user) {
+//        // TODO Auto-generated method stub
+//
+//    }
+//
+//    public List<User> findUsersByServiceName(String serviceName) {
+//        // TODO Auto-generated method stub
+//        return null;
+//    }
+//
+//}
diff --git a/dubbo-admin-backend/src/main/resources/application-develop.properties b/dubbo-admin-backend/src/main/resources/application.properties
similarity index 100%
rename from dubbo-admin-backend/src/main/resources/application-develop.properties
rename to dubbo-admin-backend/src/main/resources/application.properties