提交 1adff340 authored 作者: 黄夏豪's avatar 黄夏豪

项目完善

上级 bf66e8d9
...@@ -6,6 +6,7 @@ import com.example.personnelmanager.dao.SimpleJpaRepositoryImpl; ...@@ -6,6 +6,7 @@ import com.example.personnelmanager.dao.SimpleJpaRepositoryImpl;
import gnu.io.CommPortIdentifier; import gnu.io.CommPortIdentifier;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
...@@ -22,11 +23,11 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -22,11 +23,11 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
*/ */
@EnableAsync @EnableAsync
@EnableScheduling @EnableScheduling
//@EnableDiscoveryClient
@SpringBootApplication @SpringBootApplication
@EnableSwagger2 @EnableSwagger2
@EnableJpaAuditing @EnableJpaAuditing
@EnableJpaRepositories(repositoryBaseClass = SimpleJpaRepositoryImpl.class) @EnableJpaRepositories(repositoryBaseClass = SimpleJpaRepositoryImpl.class)
@ServletComponentScan
public class PersonnelmanagerApplication extends SpringBootServletInitializer { public class PersonnelmanagerApplication extends SpringBootServletInitializer {
...@@ -34,8 +35,8 @@ public class PersonnelmanagerApplication extends SpringBootServletInitializer { ...@@ -34,8 +35,8 @@ public class PersonnelmanagerApplication extends SpringBootServletInitializer {
SpringApplication.run(PersonnelmanagerApplication.class, args); SpringApplication.run(PersonnelmanagerApplication.class, args);
//todo 初始化一个初始企业 初始化一个admin 初始化一个节点 //todo 初始化一个初始企业 初始化一个admin 初始化一个节点
System.out.println("程序运行成功"); System.out.println("程序运行成功");
DateCenterUtil dateCenterUtil = SpringUtils.getBean("dateCenterUtil"); // DateCenterUtil dateCenterUtil = SpringUtils.getBean("dateCenterUtil");
dateCenterUtil.sendDateToCenter(); // dateCenterUtil.sendDateToCenter();
// dateCenterUtil.initUser(); // dateCenterUtil.initUser();
} }
......
...@@ -28,11 +28,12 @@ public class JWTAuthorizationFilter extends BasicAuthenticationFilter { ...@@ -28,11 +28,12 @@ public class JWTAuthorizationFilter extends BasicAuthenticationFilter {
@Override @Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException {
if (request.getHeader("jwt")!=null){ if (request.getHeader("token")!=null){
System.out.println("1"); System.out.println("1");
} }
// 如果请求头中有token,则进行解析,并且设置认证信息 // 如果请求头中有token,则进行解析,并且设置认证信息
SecurityContextHolder.getContext().setAuthentication( new UsernamePasswordAuthenticationToken("username", null, SecurityContextHolder.getContext().setAuthentication(
new UsernamePasswordAuthenticationToken("username", null,
Collections.singleton(new SimpleGrantedAuthority("ROLE_ADMIN")) Collections.singleton(new SimpleGrantedAuthority("ROLE_ADMIN"))
)); ));
super.doFilterInternal(request, response, chain); super.doFilterInternal(request, response, chain);
......
...@@ -7,7 +7,6 @@ import com.example.personnelmanager.common.authencation.filter.CustomJwtAuthenti ...@@ -7,7 +7,6 @@ import com.example.personnelmanager.common.authencation.filter.CustomJwtAuthenti
import com.example.personnelmanager.common.authencation.filter.CustomUsernamePasswordAuthenticationFilter; import com.example.personnelmanager.common.authencation.filter.CustomUsernamePasswordAuthenticationFilter;
import com.example.personnelmanager.entity.commonEntity.ResultObj; import com.example.personnelmanager.entity.commonEntity.ResultObj;
import com.google.gson.Gson; import com.google.gson.Gson;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
......
...@@ -45,7 +45,7 @@ public class DateCenterJsonUtil { ...@@ -45,7 +45,7 @@ public class DateCenterJsonUtil {
*/ */
public String initAllPeopleJsonStr(List<People> allPeople){ public String initAllPeopleJsonStr(List<People> allPeople){
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("tableId",1320331389656211458L); jsonObject.addProperty("tableId",1346658905505366017L);
jsonObject.addProperty("primaryKeyName","people_id"); jsonObject.addProperty("primaryKeyName","people_id");
JsonArray jsonElements = new JsonArray(); JsonArray jsonElements = new JsonArray();
allPeople.forEach(people -> { allPeople.forEach(people -> {
...@@ -106,7 +106,7 @@ public class DateCenterJsonUtil { ...@@ -106,7 +106,7 @@ public class DateCenterJsonUtil {
*/ */
public String initAllOrganizationNodeJsonStr(List<OrganizationNode> allNode){ public String initAllOrganizationNodeJsonStr(List<OrganizationNode> allNode){
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("tableId",1320331411160408065L); jsonObject.addProperty("tableId",1346658965509079041L);
jsonObject.addProperty("primaryKeyName","node_id"); jsonObject.addProperty("primaryKeyName","node_id");
JsonArray jsonElements = new JsonArray(); JsonArray jsonElements = new JsonArray();
allNode.forEach(node -> { allNode.forEach(node -> {
......
...@@ -12,6 +12,7 @@ import com.example.personnelmanager.service.UserServer; ...@@ -12,6 +12,7 @@ import com.example.personnelmanager.service.UserServer;
import com.github.wenhao.jpa.PredicateBuilder; import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -29,6 +30,9 @@ import java.util.List; ...@@ -29,6 +30,9 @@ import java.util.List;
@Component @Component
public class DateCenterUtil { public class DateCenterUtil {
@Value("${dataCenter}")
public String dataCenterIp;
@Autowired @Autowired
PeopleRepository peopleRepository; PeopleRepository peopleRepository;
...@@ -50,10 +54,10 @@ public class DateCenterUtil { ...@@ -50,10 +54,10 @@ public class DateCenterUtil {
public void sendDateToCenter(){ public void sendDateToCenter(){
// 将数据库中的人员数据存放到数据中心 // 将数据库中的人员数据存放到数据中心
List<People> allPeople = peopleRepository.findAll(); List<People> allPeople = peopleRepository.findAll();
httpClientUtil.post("http://124.70.194.194:8090/opt/data", jsonUtil.initAllPeopleJsonStr(allPeople), "utf-8"); httpClientUtil.post("http://"+dataCenterIp+"/opt/data", jsonUtil.initAllPeopleJsonStr(allPeople), "utf-8");
// 将数据库中的部门信息存放到数据中心 // 将数据库中的部门信息存放到数据中心
List<OrganizationNode> allNode = organizationNodeRepository.findAll(); List<OrganizationNode> allNode = organizationNodeRepository.findAll();
httpClientUtil.post("http://124.70.194.194:8090/opt/data", jsonUtil.initAllOrganizationNodeJsonStr(allNode), "utf-8"); httpClientUtil.post("http://"+dataCenterIp+"/opt/data", jsonUtil.initAllOrganizationNodeJsonStr(allNode), "utf-8");
}; };
public void initUser(){ public void initUser(){
......
...@@ -62,7 +62,7 @@ public class UserController { ...@@ -62,7 +62,7 @@ public class UserController {
JsonObject jsonObject = new JsonObject(); JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("appId", "35"); jsonObject.addProperty("appId", "35");
jsonObject.addProperty("des", "请用户完善系统中人员信息"); jsonObject.addProperty("des", "请用户完善系统中人员信息");
jsonObject.addProperty("link", "http://192.168.100.248:8080/personnel"); jsonObject.addProperty("link", "http://192.168.100.246:8080/personnel");
jsonObject.addProperty("title", "请用户完善人员信息"); jsonObject.addProperty("title", "请用户完善人员信息");
jsonObject.addProperty("userId", "1"); jsonObject.addProperty("userId", "1");
String post = httpClientUtil.post(centerServe + "/task/add", jsonObject.toString(), "utf-8"); String post = httpClientUtil.post(centerServe + "/task/add", jsonObject.toString(), "utf-8");
......
...@@ -35,6 +35,7 @@ import java.util.List; ...@@ -35,6 +35,7 @@ import java.util.List;
public class People { public class People {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "people_id",columnDefinition = "bigint comment '人员编号' ") @Column(name = "people_id",columnDefinition = "bigint comment '人员编号' ")
private Long peopleId; private Long peopleId;
......
...@@ -71,4 +71,6 @@ public class Post { ...@@ -71,4 +71,6 @@ public class Post {
} }
...@@ -21,7 +21,8 @@ import java.util.List; ...@@ -21,7 +21,8 @@ import java.util.List;
public class UserDetail extends User implements UserDetails { public class UserDetail extends User implements UserDetails {
@Override @Override
public Collection<? extends GrantedAuthority> getAuthorities() { public Collection<?
extends GrantedAuthority> getAuthorities() {
List<GrantedAuthority> simpleGrantedAuthorities = new ArrayList<>(); List<GrantedAuthority> simpleGrantedAuthorities = new ArrayList<>();
return simpleGrantedAuthorities; return simpleGrantedAuthorities;
} }
......
...@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.domain.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.persistence.EntityManager; import javax.persistence.EntityManager;
...@@ -69,6 +70,7 @@ public class AgainEntryInformationServiceImpl implements AgainEntryInformationSe ...@@ -69,6 +70,7 @@ public class AgainEntryInformationServiceImpl implements AgainEntryInformationSe
AgainEntryInformation againEntryInformation = byId.get(); AgainEntryInformation againEntryInformation = byId.get();
againEntryInformation.setDeleteTag(1); againEntryInformation.setDeleteTag(1);
againEntryInformationRepository.save(againEntryInformation); againEntryInformationRepository.save(againEntryInformation);
return true; return true;
} }
......
...@@ -18,6 +18,7 @@ import com.github.wenhao.jpa.PredicateBuilder; ...@@ -18,6 +18,7 @@ import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
import javafx.geometry.Pos; import javafx.geometry.Pos;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.domain.Specification;
...@@ -40,6 +41,9 @@ import java.util.stream.Collectors; ...@@ -40,6 +41,9 @@ import java.util.stream.Collectors;
@Transactional @Transactional
public class OrganizationNodeServiceImpl implements OrganizationNodeService { public class OrganizationNodeServiceImpl implements OrganizationNodeService {
@Value("${dataCenter}")
public String dataCenterIp;
@Autowired @Autowired
OrganizationNodeRepository organizationNodeRepository; OrganizationNodeRepository organizationNodeRepository;
...@@ -73,7 +77,7 @@ public class OrganizationNodeServiceImpl implements OrganizationNodeService { ...@@ -73,7 +77,7 @@ public class OrganizationNodeServiceImpl implements OrganizationNodeService {
organizationNode.setEnterprise(userDetails.getEnterprise()); organizationNode.setEnterprise(userDetails.getEnterprise());
OrganizationNode save = organizationNodeRepository.save(organizationNode); OrganizationNode save = organizationNodeRepository.save(organizationNode);
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.post("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllOrganizationNodeJsonStr(Arrays.asList(save)), "utf-8"); httpClientUtil.post("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllOrganizationNodeJsonStr(Arrays.asList(save)), "utf-8");
}); });
return save; return save;
} }
...@@ -173,7 +177,7 @@ public class OrganizationNodeServiceImpl implements OrganizationNodeService { ...@@ -173,7 +177,7 @@ public class OrganizationNodeServiceImpl implements OrganizationNodeService {
OrganizationNode after = organizationNodeRepository.save(organizationNode); OrganizationNode after = organizationNodeRepository.save(organizationNode);
//向数据中心修改旧的数据 //向数据中心修改旧的数据
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.put("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllOrganizationNodeJsonStr(Arrays.asList(after)), "utf-8"); httpClientUtil.put("http://"+dataCenterIp+":8090/opt/data", dateCenterJsonUtil.initAllOrganizationNodeJsonStr(Arrays.asList(after)), "utf-8");
}); });
return after; return after;
} }
...@@ -210,7 +214,7 @@ public class OrganizationNodeServiceImpl implements OrganizationNodeService { ...@@ -210,7 +214,7 @@ public class OrganizationNodeServiceImpl implements OrganizationNodeService {
}); });
//向数据中心修改旧的数据 //向数据中心修改旧的数据
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.put("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllOrganizationNodeJsonStr(Arrays.asList(one)), "utf-8"); httpClientUtil.put("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllOrganizationNodeJsonStr(Arrays.asList(one)), "utf-8");
}); });
return true; return true;
} }
......
...@@ -12,6 +12,7 @@ import com.example.personnelmanager.service.PeoplePostService; ...@@ -12,6 +12,7 @@ import com.example.personnelmanager.service.PeoplePostService;
import com.github.wenhao.jpa.PredicateBuilder; import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.domain.Specification;
...@@ -35,6 +36,9 @@ import java.util.concurrent.ExecutorService; ...@@ -35,6 +36,9 @@ import java.util.concurrent.ExecutorService;
@Service @Service
public class PeoplePostServiceImpl implements PeoplePostService { public class PeoplePostServiceImpl implements PeoplePostService {
@Value("${dataCenter}")
public String dataCenterIp;
@Autowired @Autowired
DateCenterJsonUtil dateCenterJsonUtil; DateCenterJsonUtil dateCenterJsonUtil;
...@@ -68,7 +72,7 @@ public class PeoplePostServiceImpl implements PeoplePostService { ...@@ -68,7 +72,7 @@ public class PeoplePostServiceImpl implements PeoplePostService {
} }
PeoplePost save = peoplePostRepository.save(peoplePost); PeoplePost save = peoplePostRepository.save(peoplePost);
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.put("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(peopleRepository.getOne(save.getPeople().getPeopleId()))), "utf-8"); httpClientUtil.put("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(peopleRepository.getOne(save.getPeople().getPeopleId()))), "utf-8");
}); });
return save; return save;
} }
...@@ -89,7 +93,7 @@ public class PeoplePostServiceImpl implements PeoplePostService { ...@@ -89,7 +93,7 @@ public class PeoplePostServiceImpl implements PeoplePostService {
public PeoplePost update(PeoplePost peoplePost) { public PeoplePost update(PeoplePost peoplePost) {
PeoplePost save = peoplePostRepository.save(peoplePost); PeoplePost save = peoplePostRepository.save(peoplePost);
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.put("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(peopleRepository.getOne(save.getPeople().getPeopleId()))), "utf-8"); httpClientUtil.put("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(peopleRepository.getOne(save.getPeople().getPeopleId()))), "utf-8");
}); });
return save; return save;
......
...@@ -7,17 +7,15 @@ import com.example.personnelmanager.common.utils.DateCenterJsonUtil; ...@@ -7,17 +7,15 @@ import com.example.personnelmanager.common.utils.DateCenterJsonUtil;
import com.example.personnelmanager.common.utils.HttpClientUtil; import com.example.personnelmanager.common.utils.HttpClientUtil;
import com.example.personnelmanager.dao.PeopleRepository; import com.example.personnelmanager.dao.PeopleRepository;
import com.example.personnelmanager.entity.*; import com.example.personnelmanager.entity.*;
import com.example.personnelmanager.entity.vo.PeopleVo;
import com.example.personnelmanager.entity.vo.pageableVo.PeoplePageableVo; import com.example.personnelmanager.entity.vo.pageableVo.PeoplePageableVo;
import com.example.personnelmanager.service.*; import com.example.personnelmanager.service.*;
import com.github.wenhao.jpa.PredicateBuilder; import com.github.wenhao.jpa.PredicateBuilder;
import com.github.wenhao.jpa.Specifications; import com.github.wenhao.jpa.Specifications;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.domain.Specification;
import org.springframework.security.core.parameters.P;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -41,6 +39,9 @@ import java.util.concurrent.ExecutorService; ...@@ -41,6 +39,9 @@ import java.util.concurrent.ExecutorService;
@Service @Service
public class PeopleServiceImpl implements PeopleService { public class PeopleServiceImpl implements PeopleService {
@Value("${dataCenter}")
public String dataCenterIp;
@Autowired @Autowired
PeopleRepository peopleRepository; PeopleRepository peopleRepository;
...@@ -107,9 +108,9 @@ public class PeopleServiceImpl implements PeopleService { ...@@ -107,9 +108,9 @@ public class PeopleServiceImpl implements PeopleService {
user.setPhone(people.getPhone()); user.setPhone(people.getPhone());
userServer.addEntity(user); userServer.addEntity(user);
// //向数据中心插入新的数据 // //向数据中心插入新的数据
// executorService.submit(() -> { executorService.submit(() -> {
// httpClientUtil.post("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(save)), "utf-8"); httpClientUtil.post("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(save)), "utf-8");
// }); });
return save; return save;
} }
...@@ -141,7 +142,7 @@ public class PeopleServiceImpl implements PeopleService { ...@@ -141,7 +142,7 @@ public class PeopleServiceImpl implements PeopleService {
People after = peopleRepository.save(people); People after = peopleRepository.save(people);
//向数据中心修改旧的数据 //向数据中心修改旧的数据
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.put("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(after)), "utf-8"); httpClientUtil.put("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(after)), "utf-8");
}); });
return after; return after;
} }
...@@ -166,7 +167,7 @@ public class PeopleServiceImpl implements PeopleService { ...@@ -166,7 +167,7 @@ public class PeopleServiceImpl implements PeopleService {
People after = peopleRepository.save(people); People after = peopleRepository.save(people);
//向数据中心修改旧的数据 //向数据中心修改旧的数据
executorService.submit(() -> { executorService.submit(() -> {
httpClientUtil.put("http://124.70.194.194:8090/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(after)), "utf-8"); httpClientUtil.put("http://"+dataCenterIp+"/opt/data", dateCenterJsonUtil.initAllPeopleJsonStr(Arrays.asList(after)), "utf-8");
}); });
return true; return true;
} }
......
package com.example.personnelmanager.service.impl; package com.example.personnelmanager.service.impl;
import com.example.personnelmanager.entity.Enterprise; import com.example.personnelmanager.entity.Enterprise;
import com.example.personnelmanager.entity.People;
import com.example.personnelmanager.entity.User; import com.example.personnelmanager.entity.User;
import com.example.personnelmanager.entity.UserDetail; import com.example.personnelmanager.entity.UserDetail;
import com.example.personnelmanager.service.UserServer; import com.example.personnelmanager.service.UserServer;
......
...@@ -12,6 +12,8 @@ file: ...@@ -12,6 +12,8 @@ file:
#center: #center:
# ip: 124.70.194.194 # ip: 124.70.194.194
# serve: http://124.70.194.194:12346 # serve: http://124.70.194.194:12346
##Eureka设置 ##Eureka设置
#eureka: #eureka:
# instance: # instance:
...@@ -72,4 +74,6 @@ spring: ...@@ -72,4 +74,6 @@ spring:
center: center:
ip: 124.70.194.194 ip: 124.70.194.194
serve: http://124.70.194.194:11324 serve: http://124.70.194.194:11324
\ No newline at end of file
dataCenter: 192.168.100.246:8090
...@@ -10,8 +10,9 @@ file: ...@@ -10,8 +10,9 @@ file:
# serverAddress: 124.70.194.194:${server.port} # serverAddress: 124.70.194.194:${server.port}
# #
center: center:
ip: 124.70.194.194 ip: 127.0.0.1
serve: http://124.70.194.194:11324 serve: http://127.0.0.1:11324
##Eureka设置 ##Eureka设置
#eureka: #eureka:
# instance: # instance:
...@@ -64,10 +65,10 @@ center: ...@@ -64,10 +65,10 @@ center:
# com.zjty: debug # com.zjty: debug
# dao: debug # dao: debug
dataCenter: 192.168.100.246:8090
spring: spring:
datasource: datasource:
username: hxh username: root
password: Qwert123123 password: root
url: jdbc:mysql://124.70.145.101:3306/personnelManager?useSSL=false&serverTimezone=UTC&characterEncoding=utf-8 url: jdbc:mysql://192.168.100.246:3306/personnelManager?useSSL=false&serverTimezone=UTC&characterEncoding=utf-8
# dao: debug # dao: debug
\ No newline at end of file
...@@ -28,4 +28,5 @@ spring: ...@@ -28,4 +28,5 @@ spring:
sql-dialect: MySQL5Dialect sql-dialect: MySQL5Dialect
jackson: jackson:
date-format: yyyy-MM-dd HH:mm:ss date-format: yyyy-MM-dd HH:mm:ss
time-zone: GMT+8 time-zone: GMT+8
\ No newline at end of file
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论