Commit 6c72f69e authored by frank.xa.zhang's avatar frank.xa.zhang

fixed hard code url to config file

parent 2a864c5f
......@@ -5,6 +5,7 @@ import org.apache.commons.lang3.BooleanUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
......@@ -74,6 +75,9 @@ public class UserServiceImpl extends AbstractService implements UserService {
@Autowired
private UserRoleService userRoleService;
@Value("${api.url}")
private String apiUrl;
@Override
public UserPermissionDto getUserPermission(String userName) {
User user = userMapper.selectByUserNameIgnoreCase(userName);
......@@ -410,7 +414,7 @@ public class UserServiceImpl extends AbstractService implements UserService {
token.setExpires_in(86400000L);
// api_host可以由atms-web端来赋值
token.setApi_host("NA");
token.setVat_api_host("http://localhost:8180");
token.setVat_api_host(apiUrl);
token.setTp_url("https://cnshaappuwv023:35001");
token.setVersion("1.0" + ".0.0");
token.setUser_name(inputLoginName);
......
......@@ -27,4 +27,6 @@ max_file_length=${max_file_length}
#Distributed ID Generate
distributed_id_datacenter=${distributed_id_datacenter}
distributed_id_machine=${distributed_id_machine}
\ No newline at end of file
distributed_id_machine=${distributed_id_machine}
api.url=${api.url}
\ No newline at end of file
......@@ -27,4 +27,6 @@ max_file_length=104857600
#Distributed ID Generate
distributed_id_datacenter=1
distributed_id_machine=1
\ No newline at end of file
distributed_id_machine=1
api.url=http://localhost:8180
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment