diff --git a/doc/pigxx.sql b/doc/pigxx.sql index e14d2bd08..bdb2b7785 100644 --- a/doc/pigxx.sql +++ b/doc/pigxx.sql @@ -4,7 +4,7 @@ Source Server : RDS本地使用 Source Server Type : MySQL Source Server Version : 50721 - Source Host : 127.0.0.1 + Source Host : lengleng Source Database : pigxx Target Server Type : MySQL diff --git a/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/AuthorizationServerConfig.java b/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/AuthorizationServerConfig.java index e08d45e56..01fa8afbc 100644 --- a/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/AuthorizationServerConfig.java +++ b/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/AuthorizationServerConfig.java @@ -21,6 +21,7 @@ package com.pig4cloud.pigx.auth.config; import com.pig4cloud.pigx.common.core.constant.SecurityConstants; import com.pig4cloud.pigx.common.security.component.PigxWebResponseExceptionTranslator; +import com.pig4cloud.pigx.common.security.service.PigxClientDetailsService; import com.pig4cloud.pigx.common.security.service.PigxUserDetailsService; import lombok.AllArgsConstructor; import org.springframework.context.annotation.Bean; @@ -34,7 +35,6 @@ import org.springframework.security.oauth2.config.annotation.web.configuration.A import org.springframework.security.oauth2.config.annotation.web.configuration.EnableAuthorizationServer; import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerEndpointsConfigurer; import org.springframework.security.oauth2.config.annotation.web.configurers.AuthorizationServerSecurityConfigurer; -import org.springframework.security.oauth2.provider.client.JdbcClientDetailsService; import org.springframework.security.oauth2.provider.token.TokenEnhancer; import org.springframework.security.oauth2.provider.token.TokenStore; import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore; @@ -59,21 +59,21 @@ public class AuthorizationServerConfig extends AuthorizationServerConfigurerAdap @Override public void configure(ClientDetailsServiceConfigurer clients) throws Exception { - JdbcClientDetailsService clientDetailsService = new JdbcClientDetailsService(dataSource); + PigxClientDetailsService clientDetailsService = new PigxClientDetailsService(dataSource); clientDetailsService.setSelectClientDetailsSql(SecurityConstants.DEFAULT_SELECT_STATEMENT); clientDetailsService.setFindClientDetailsSql(SecurityConstants.DEFAULT_FIND_STATEMENT); clients.withClientDetails(clientDetailsService); } @Override - public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { + public void configure(AuthorizationServerSecurityConfigurer oauthServer) { oauthServer .allowFormAuthenticationForClients() .checkTokenAccess("permitAll()"); } @Override - public void configure(AuthorizationServerEndpointsConfigurer endpoints) throws Exception { + public void configure(AuthorizationServerEndpointsConfigurer endpoints) { endpoints .allowedTokenEndpointRequestMethods(HttpMethod.GET, HttpMethod.POST) .tokenStore(tokenStore()) diff --git a/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/WebSecurityConfigurer.java b/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/WebSecurityConfigurer.java index d02e29467..59b41c0a3 100644 --- a/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/WebSecurityConfigurer.java +++ b/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/config/WebSecurityConfigurer.java @@ -91,8 +91,10 @@ public class WebSecurityConfigurer extends WebSecurityConfigurerAdapter { @Bean public MobileSecurityConfigurer mobileSecurityConfigurer() { - return new MobileSecurityConfigurer(mobileLoginSuccessHandler() - , userDetailsService); + MobileSecurityConfigurer mobileSecurityConfigurer = new MobileSecurityConfigurer(); + mobileSecurityConfigurer.setMobileLoginSuccessHandler(mobileLoginSuccessHandler()); + mobileSecurityConfigurer.setUserDetailsService(userDetailsService); + return mobileSecurityConfigurer; } diff --git a/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/handler/PigxAuthenticationFailureEvenHandler.java b/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/handler/PigxAuthenticationFailureEvenHandler.java index 92e3cdfa3..ceb0321fb 100644 --- a/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/handler/PigxAuthenticationFailureEvenHandler.java +++ b/pigx-auth/src/main/java/com/pig4cloud/pigx/auth/handler/PigxAuthenticationFailureEvenHandler.java @@ -32,7 +32,7 @@ import org.springframework.stereotype.Component; public class PigxAuthenticationFailureEvenHandler extends AuthenticationFailureEvenHandler { /** - * 处理登录成功方法 + * 处理登录失败方法 *

* * @param authenticationException 登录的authentication 对象 diff --git a/pigx-auth/src/main/resources/bootstrap.yml b/pigx-auth/src/main/resources/bootstrap.yml index aed68dfa4..ae2131512 100644 --- a/pigx-auth/src/main/resources/bootstrap.yml +++ b/pigx-auth/src/main/resources/bootstrap.yml @@ -20,4 +20,4 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pigx-common/pigx-common-core/pom.xml b/pigx-common/pigx-common-core/pom.xml index 01f74d55a..72752e787 100644 --- a/pigx-common/pigx-common-core/pom.xml +++ b/pigx-common/pigx-common-core/pom.xml @@ -70,12 +70,18 @@ org.springframework.boot spring-boot-starter-validation - + com.fasterxml.jackson.module - jackson-modules-java8 - ${jackson.modules} - pom + jackson-module-parameter-names + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/config/JacksonConfig.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/config/JacksonConfig.java index f828857dd..678cfde84 100644 --- a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/config/JacksonConfig.java +++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/config/JacksonConfig.java @@ -1,56 +1,54 @@ -/* - * - * Copyright (c) 2018-2025, lengleng All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * Neither the name of the pig4cloud.com developer nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * Author: lengleng (wangiegie@gmail.com) - * - */ - package com.pig4cloud.pigx.common.core.config; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalTimeSerializer; import org.springframework.boot.autoconfigure.AutoConfigureBefore; import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; /** * JacksonConfig * * @author: lengleng - * @date: 2018/7/28 12:29 + * @author: lishangbu + * @date: 2018/10/22 */ @Configuration @ConditionalOnClass(ObjectMapper.class) @AutoConfigureBefore(JacksonAutoConfiguration.class) public class JacksonConfig { /** - * 针对JDK 1.8 特殊处理 - * .registerModule(new ParameterNamesModule()) - * .registerModule(new Jdk8Module()) - * .registerModule(new JavaTimeModule()); // new module, NOT JSR310Module + * 针对JDK 1.8的日期时间格式特殊处理 * - * @return + * @return ObjectMapper */ @Bean - public ObjectMapper getObjectMapper(Jackson2ObjectMapperBuilder builder) { - ObjectMapper objectMapper = builder.createXmlMapper(false).build(); - objectMapper.findAndRegisterModules(); + public ObjectMapper getObjectMapper() { + ObjectMapper objectMapper = new ObjectMapper(); + JavaTimeModule javaTimeModule = new JavaTimeModule(); + javaTimeModule.addSerializer(LocalDateTime.class, new LocalDateTimeSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + javaTimeModule.addSerializer(LocalDate.class, new LocalDateSerializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + javaTimeModule.addSerializer(LocalTime.class, new LocalTimeSerializer(DateTimeFormatter.ofPattern("HH:mm:ss"))); + javaTimeModule.addDeserializer(LocalDateTime.class, new LocalDateTimeDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + javaTimeModule.addDeserializer(LocalDate.class, new LocalDateDeserializer(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + javaTimeModule.addDeserializer(LocalTime.class, new LocalTimeDeserializer(DateTimeFormatter.ofPattern("HH:mm:ss"))); + // javaTimeModule只能手动注册,参考https://github.com/FasterXML/jackson-modules-java8 + objectMapper.registerModule(javaTimeModule); // 忽略json字符串中不识别的属性 objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); // 忽略无法转换的对象 diff --git a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/SecurityConstants.java b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/SecurityConstants.java index 8a9158b21..8d2fcd944 100644 --- a/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/SecurityConstants.java +++ b/pigx-common/pigx-common-core/src/main/java/com/pig4cloud/pigx/common/core/constant/SecurityConstants.java @@ -52,6 +52,32 @@ public interface SecurityConstants { */ String FROM = "from"; + /** + * 手机号登录URL + */ + String MOBILE_TOKEN_URL = "/mobile/token"; + + /** + * 默认登录URL + */ + String OAUTH_TOKEN_URL = "/oauth/token"; + + /** + * grant_type + */ + String REFRESH_TOKEN = "refresh_token"; + + /** + * oauth 客户端信息 + */ + String CLIENT_DETAILS_KEY = "pigx_oauth:client:details"; + + /** + * 微信获取OPENID + */ + String WX_AUTHORIZATION_CODE_URL = "https://api.weixin.qq.com/sns/oauth2/access_token" + + "?appid=%s&secret=%s&code=%s&grant_type=authorization_code"; + /** * {bcrypt} 加密的特征码 */ @@ -79,14 +105,4 @@ public interface SecurityConstants { */ String DEFAULT_SELECT_STATEMENT = BASE_FIND_STATEMENT + " where client_id = ?"; - /** - * 手机号登录URL - */ - String MOBILE_TOKEN_URL = "/mobile/token"; - - /** - * 微信获取OPENID - */ - String WX_AUTHORIZATION_CODE_URL = "https://api.weixin.qq.com/sns/oauth2/access_token" + - "?appid=%s&secret=%s&code=%s&grant_type=authorization_code"; } diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/MobileLoginSuccessHandler.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/MobileLoginSuccessHandler.java index 53cec6c86..16b04d9b7 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/MobileLoginSuccessHandler.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/handler/MobileLoginSuccessHandler.java @@ -99,6 +99,7 @@ public class MobileLoginSuccessHandler implements AuthenticationSuccessHandler { throw new BadCredentialsException( "Failed to decode basic authentication token"); } + } diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileAuthenticationFilter.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileAuthenticationFilter.java index 7eb4fdb62..98494a522 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileAuthenticationFilter.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileAuthenticationFilter.java @@ -24,6 +24,7 @@ import org.springframework.http.HttpMethod; import org.springframework.security.authentication.AuthenticationEventPublisher; import org.springframework.security.authentication.AuthenticationServiceException; import org.springframework.security.authentication.BadCredentialsException; +import org.springframework.security.authentication.DefaultAuthenticationEventPublisher; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.context.SecurityContextHolder; @@ -43,7 +44,6 @@ import javax.servlet.http.HttpServletResponse; */ public class MobileAuthenticationFilter extends AbstractAuthenticationProcessingFilter { private static final String SPRING_SECURITY_FORM_MOBILE_KEY = "mobile"; - private AuthenticationEventPublisher eventPublisher = new MobileAuthenticationFilter.NullEventPublisher(); private AuthenticationEntryPoint authenticationEntryPoint = new MobileAuthenticationEntryPoint(); @Getter @Setter @@ -51,6 +51,9 @@ public class MobileAuthenticationFilter extends AbstractAuthenticationProcessing @Getter @Setter private boolean postOnly = true; + @Getter + @Setter + private AuthenticationEventPublisher eventPublisher; public MobileAuthenticationFilter() { super(new AntPathRequestMatcher(SecurityConstants.MOBILE_TOKEN_URL, "POST")); @@ -76,8 +79,13 @@ public class MobileAuthenticationFilter extends AbstractAuthenticationProcessing setDetails(request, mobileAuthenticationToken); + Authentication authResult = null; try { - return this.getAuthenticationManager().authenticate(mobileAuthenticationToken); + authResult = this.getAuthenticationManager().authenticate(mobileAuthenticationToken); + + logger.debug("Authentication success: " + authResult); + eventPublisher.publishAuthenticationSuccess(authResult); + SecurityContextHolder.getContext().setAuthentication(authResult); } catch (Exception failed) { SecurityContextHolder.clearContext(); @@ -93,7 +101,8 @@ public class MobileAuthenticationFilter extends AbstractAuthenticationProcessing logger.error("authenticationEntryPoint handle error:{}", failed); } } - return null; + + return authResult; } private String obtainMobile(HttpServletRequest request) { @@ -104,15 +113,5 @@ public class MobileAuthenticationFilter extends AbstractAuthenticationProcessing MobileAuthenticationToken authRequest) { authRequest.setDetails(authenticationDetailsSource.buildDetails(request)); } - - private static final class NullEventPublisher implements AuthenticationEventPublisher { - @Override - public void publishAuthenticationFailure(AuthenticationException exception, Authentication authentication) { - } - - @Override - public void publishAuthenticationSuccess(Authentication authentication) { - } - } } diff --git a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileSecurityConfigurer.java b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileSecurityConfigurer.java index f71672931..25a67aaed 100644 --- a/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileSecurityConfigurer.java +++ b/pigx-common/pigx-common-security/src/main/java/com/pig4cloud/pigx/common/security/mobile/MobileSecurityConfigurer.java @@ -18,7 +18,10 @@ package com.pig4cloud.pigx.common.security.mobile; import com.pig4cloud.pigx.common.security.service.PigxUserDetailsService; -import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.Setter; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.authentication.AuthenticationEventPublisher; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.config.annotation.SecurityConfigurerAdapter; import org.springframework.security.config.annotation.web.builders.HttpSecurity; @@ -32,9 +35,12 @@ import org.springframework.stereotype.Component; * @date 2018/8/5 * 手机号登录配置入口 */ +@Getter +@Setter @Component -@AllArgsConstructor public class MobileSecurityConfigurer extends SecurityConfigurerAdapter { + @Autowired + private AuthenticationEventPublisher defaultAuthenticationEventPublisher; private AuthenticationSuccessHandler mobileLoginSuccessHandler; private PigxUserDetailsService userDetailsService; @@ -43,6 +49,7 @@ public class MobileSecurityConfigurer extends SecurityConfigurerAdapter + * see JdbcClientDetailsService + */ +public class PigxClientDetailsService extends JdbcClientDetailsService { + + public PigxClientDetailsService(DataSource dataSource) { + super(dataSource); + } + + /** + * 重写原生方法支持redis缓存 + * + * @param clientId + * @return + * @throws InvalidClientException + */ + @Override + @Cacheable(value = SecurityConstants.CLIENT_DETAILS_KEY, key = "#clientId", unless = "#result == null") + public ClientDetails loadClientByClientId(String clientId) throws InvalidClientException { + return super.loadClientByClientId(clientId); + } +} diff --git a/pigx-config/src/main/resources/bootstrap.yml b/pigx-config/src/main/resources/bootstrap.yml index 5564b817f..e61671816 100644 --- a/pigx-config/src/main/resources/bootstrap.yml +++ b/pigx-config/src/main/resources/bootstrap.yml @@ -19,7 +19,7 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ # 暴露监控端点 management: diff --git a/pigx-config/src/main/resources/config/application-dev.yml b/pigx-config/src/main/resources/config/application-dev.yml index 9f1e379b9..49df6da29 100644 --- a/pigx-config/src/main/resources/config/application-dev.yml +++ b/pigx-config/src/main/resources/config/application-dev.yml @@ -7,6 +7,10 @@ spring: redis: password: host: redis + # Jackson配置 + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss # 暴露监控端点 management: endpoints: @@ -94,7 +98,7 @@ swagger: ## spring security 配置 security: auth: - server: http://localhost:9999/auth/oauth + server: http://lengleng:9999/auth/oauth oauth2: resource: token-info-uri: ${security.auth.server}/check_token diff --git a/pigx-config/src/main/resources/config/pigx-codegen-dev.yml b/pigx-config/src/main/resources/config/pigx-codegen-dev.yml index 509fa8afd..923770e6a 100644 --- a/pigx-config/src/main/resources/config/pigx-codegen-dev.yml +++ b/pigx-config/src/main/resources/config/pigx-codegen-dev.yml @@ -13,9 +13,6 @@ spring: driver-class-name: com.mysql.jdbc.Driver username: root password: 123456 - url: jdbc:mysql://mysql:3306/pigxx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false - jackson: - time-zone: GMT+8 - date-format: yyyy-MM-dd HH:mm:ss + url: jdbc:mysql://mysql:3306/pigx?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false resources: static-locations: classpath:/static/,classpath:/views/ diff --git a/pigx-eureka/src/main/resources/bootstrap.yml b/pigx-eureka/src/main/resources/bootstrap.yml index 2c36ec856..4705ec741 100644 --- a/pigx-eureka/src/main/resources/bootstrap.yml +++ b/pigx-eureka/src/main/resources/bootstrap.yml @@ -13,7 +13,7 @@ spring: # 类似的 redis 使用pigx-redis ,gateway 换成 pigx-gateway eureka: instance: - hostname: localhost + hostname: lengleng prefer-ip-address: true client: register-with-eureka: false diff --git a/pigx-gateway/src/main/resources/bootstrap.yml b/pigx-gateway/src/main/resources/bootstrap.yml index aeb0ffd87..32d17c105 100644 --- a/pigx-gateway/src/main/resources/bootstrap.yml +++ b/pigx-gateway/src/main/resources/bootstrap.yml @@ -22,6 +22,6 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/PigxAdminApplication.java b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/PigxAdminApplication.java index f8783b80d..7b26941be 100644 --- a/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/PigxAdminApplication.java +++ b/pigx-upms/pigx-upms-biz/src/main/java/com/pig4cloud/pigx/admin/PigxAdminApplication.java @@ -22,6 +22,7 @@ package com.pig4cloud.pigx.admin; import com.pig4cloud.pigx.common.security.feign.EnablePigxFeignClients; import com.pig4cloud.pigx.common.swagger.annotation.EnablePigxSwagger2; +import com.zaxxer.hikari.HikariDataSource; import org.springframework.boot.SpringApplication; import org.springframework.cloud.client.SpringCloudApplication; @@ -37,4 +38,5 @@ public class PigxAdminApplication { public static void main(String[] args) { SpringApplication.run(PigxAdminApplication.class, args); } + } diff --git a/pigx-upms/pigx-upms-biz/src/main/resources/bootstrap.yml b/pigx-upms/pigx-upms-biz/src/main/resources/bootstrap.yml index 1dbe02882..c9d3197ee 100644 --- a/pigx-upms/pigx-upms-biz/src/main/resources/bootstrap.yml +++ b/pigx-upms/pigx-upms-biz/src/main/resources/bootstrap.yml @@ -16,6 +16,9 @@ spring: discovery: enabled: true service-id: pigx-config + datasource: + url: + type: com.zaxxer.hikari.HikariDataSource # 注册中心配置 eureka: @@ -23,4 +26,4 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pigx-visual/pigx-activiti/src/main/resources/bootstrap.yml b/pigx-visual/pigx-activiti/src/main/resources/bootstrap.yml index b4d321d53..e382982e6 100644 --- a/pigx-visual/pigx-activiti/src/main/resources/bootstrap.yml +++ b/pigx-visual/pigx-activiti/src/main/resources/bootstrap.yml @@ -14,7 +14,7 @@ spring: enabled: true service-id: pigx-config datasource: - url: jdbc:mysql://127.0.0.1:3306/ac?characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://lengleng:3306/ac?characterEncoding=UTF-8&useSSL=false username: root password: 123456 driver-class-name: com.mysql.jdbc.Driver @@ -27,7 +27,7 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ ## spring security 配置 security: @@ -39,7 +39,7 @@ security: resource: token-info-uri: ${security.auth.server}/check_token auth: - server: http://localhost:9999/auth/oauth + server: http://lengleng:9999/auth/oauth # 加解密根密码 jasypt: diff --git a/pigx-visual/pigx-codegen/src/main/resources/bootstrap.yml b/pigx-visual/pigx-codegen/src/main/resources/bootstrap.yml index 824bad919..0ef979fd6 100644 --- a/pigx-visual/pigx-codegen/src/main/resources/bootstrap.yml +++ b/pigx-visual/pigx-codegen/src/main/resources/bootstrap.yml @@ -20,4 +20,4 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pigx-visual/pigx-daemon/src/main/resources/bootstrap.yml b/pigx-visual/pigx-daemon/src/main/resources/bootstrap.yml index da9accb63..c38740c2a 100644 --- a/pigx-visual/pigx-daemon/src/main/resources/bootstrap.yml +++ b/pigx-visual/pigx-daemon/src/main/resources/bootstrap.yml @@ -20,4 +20,4 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pigx-visual/pigx-monitor/src/main/resources/bootstrap.yml b/pigx-visual/pigx-monitor/src/main/resources/bootstrap.yml index 1e29612c9..4965a578e 100644 --- a/pigx-visual/pigx-monitor/src/main/resources/bootstrap.yml +++ b/pigx-visual/pigx-monitor/src/main/resources/bootstrap.yml @@ -20,4 +20,4 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pigx-visual/pigx-tx-manager/src/main/resources/bootstrap.yml b/pigx-visual/pigx-tx-manager/src/main/resources/bootstrap.yml index 50f914d85..0e569d048 100644 --- a/pigx-visual/pigx-tx-manager/src/main/resources/bootstrap.yml +++ b/pigx-visual/pigx-tx-manager/src/main/resources/bootstrap.yml @@ -20,5 +20,5 @@ eureka: prefer-ip-address: true client: service-url: - defaultZone: http://pig:pig@localhost:1025/eureka/ + defaultZone: http://pig:pig@lengleng:1025/eureka/ diff --git a/pom.xml b/pom.xml index b0049c87b..638c86579 100644 --- a/pom.xml +++ b/pom.xml @@ -136,6 +136,14 @@ pom import + + + com.fasterxml.jackson.module + jackson-modules-java8 + ${jackson.modules} + pom + import +