Commit 1c214cd8 by wangdayewjf

fixed

parent af5fcf9f
HELP.md
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**
!**/src/test/**
### STS ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### IntelliJ IDEA ###
.idea
*.iws
*.iml
*.ipr
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
### VS Code ###
.vscode/
/mvnw
/mvnw.cmd
/MavenWrapperDownloader.java
/maven-wrapper.jar
/maven-wrapper.properties
/ydl-auth-service-DEBUG.log
/ydl-auth-service-DEBUG.log.2019-12-09.0.gz
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
<modules>
<module>ydl-auth-api</module>
<module>ydl-auth-service</module>
<module>ydl-auth-inf</module>
</modules>
<parent>
<groupId>com.ydl</groupId>
<artifactId>ydl-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>com.ydl</groupId>
<artifactId>ydl-auth</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>ydl-auth</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<ydl.common.version>3.0.0-SNAPSHOT</ydl.common.version>
</properties>
<dependencies>
<dependency>
<groupId>com.ydl</groupId>
<artifactId>ydl-common</artifactId>
<version>${ydl.common.version}</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.ydl</groupId>
<artifactId>ydl-common</artifactId>
<version>${ydl.common.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
...@@ -10,6 +10,52 @@ ...@@ -10,6 +10,52 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>ydl-auth-api</artifactId> <artifactId>ydl-auth-api</artifactId>
<dependencies>
<dependency>
<groupId>com.ydl</groupId>
<artifactId>ydl-auth-inf</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>soul-common</artifactId>
<groupId>org.dromara</groupId>
</exclusion>
<exclusion>
<artifactId>soul-web</artifactId>
<groupId>org.dromara</groupId>
</exclusion>
</exclusions>
</dependency>
<!-- 支持 @ConfigurationProperties 注解 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
</dependency>
<!-- 导入Dubbo jar包 -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>2.6.2</version>
<exclusions>
<exclusion>
<artifactId>spring</artifactId>
<groupId>org.springframework</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</project> </project>
\ No newline at end of file
package com.ydl.ydlauth; package com.ydl.auth;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
......
package com.ydl.ydlauth; package com.ydl.auth;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
......
package com.ydl.ydlauth.apis; package com.ydl.auth.apis;
import com.alibaba.dubbo.config.annotation.Reference; import com.alibaba.dubbo.config.annotation.Reference;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import com.ydl.auth.dto.RequestDTO;
import com.ydl.auth.inf.AppAuthFacade; import com.ydl.auth.inf.AppAuthFacade;
import com.ydl.common.dto.BaseDtoResponse; import com.ydl.common.dto.BaseDtoResponse;
import com.ydl.common.helper.ResponseFormatterHelper; import com.ydl.common.helper.ResponseFormatterHelper;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.dromara.soul.common.constant.Constants;
import org.dromara.soul.web.request.RequestDTO;
import org.springframework.util.DigestUtils; import org.springframework.util.DigestUtils;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
......
/*
* 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 com.ydl.auth.dto; package com.ydl.auth.dto;
import lombok.Data; import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.dromara.soul.common.constant.Constants;
import org.dromara.soul.common.dto.MetaData;
import org.dromara.soul.common.enums.HttpMethodEnum;
import org.dromara.soul.common.enums.RpcTypeEnum;
import org.springframework.http.server.reactive.ServerHttpRequest;
import org.springframework.util.MultiValueMap;
import java.io.Serializable; import java.io.Serializable;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.util.Objects;
/** /**
* the soul request DTO . * the soul request DTO .
...@@ -49,16 +25,7 @@ public class RequestDTO implements Serializable { ...@@ -49,16 +25,7 @@ public class RequestDTO implements Serializable {
*/ */
private String method; private String method;
/**
* is rpcType data. now we only support "http","dubbo" "springCloud".
* {@linkplain RpcTypeEnum}
*/
private String rpcType;
/**
* httpMethod now we only support "get","post" .
* {@linkplain HttpMethodEnum}
*/
private String httpMethod; private String httpMethod;
/** /**
...@@ -92,10 +59,6 @@ public class RequestDTO implements Serializable { ...@@ -92,10 +59,6 @@ public class RequestDTO implements Serializable {
*/ */
private String realUrl; private String realUrl;
/**
* the metaData.
*/
private MetaData metaData;
/** /**
* this is dubbo params. * this is dubbo params.
...@@ -107,18 +70,6 @@ public class RequestDTO implements Serializable { ...@@ -107,18 +70,6 @@ public class RequestDTO implements Serializable {
*/ */
private LocalDateTime startDateTime; private LocalDateTime startDateTime;
/**
* Transform map request dto.
*
* @param queryParams the query params
* @return the request dto
*/
public static RequestDTO transformMap(final MultiValueMap<String, String> queryParams) {
RequestDTO requestDTO = new RequestDTO();
requestDTO.setModule(queryParams.getFirst(Constants.MODULE));
requestDTO.setMethod(queryParams.getFirst(Constants.METHOD));
requestDTO.setRpcType(queryParams.getFirst(Constants.RPC_TYPE));
return requestDTO;
}
} }
server: server:
port: 8089 port: 8089
servlet: servlet:
context-path: /advertise context-path: /ydlAuth
spring: spring:
profiles: profiles:
active: local active: local
application: application:
name: ydl-advertise-api name: ydl-auth-api
logging: logging:
file: /opt/release/logs/test/${spring.application.name}-DEBUG.log file: /opt/release/logs/test/${spring.application.name}-DEBUG.log
...@@ -18,39 +18,17 @@ logging: ...@@ -18,39 +18,17 @@ logging:
#原始数据kafka读取
kafka:
consumer:
servers: 47.111.174.49:9091
enable:
auto:
commit: true
interval: 100
offset:
reset: latest
topic: maidian_topic
session:
timeout: 20000
producer:
servers: 47.111.174.49:9091
maidianTopic: nontrace_maidian_topic
retries: 0
batch:
size: 4096
linger: 1
buffer:
memory: 40960
--- ---
spring: spring:
profiles: local profiles: local
dubbo: dubbo:
application: application:
name: ydl-advertise-api name: ydl-auth-api
registry: registry:
id: zookeeper id: zookeeper
#address: zookeeper://127.0.0.1:2181 address: zookeeper://127.0.0.1:2181
address: zookeeper://47.97.49.44:2181?backup=47.97.49.44:2182,47.97.49.44:2183 #address: zookeeper://47.97.49.44:2181?backup=47.97.49.44:2182,47.97.49.44:2183
protocol: zookeeper protocol: zookeeper
--- ---
...@@ -59,7 +37,7 @@ spring: ...@@ -59,7 +37,7 @@ spring:
profiles: dev profiles: dev
dubbo: dubbo:
application: application:
name: ydl-advertise-api name: ydl-auth-api
registry: registry:
id: zookeeper id: zookeeper
#address: zookeeper://127.0.0.1:2181 #address: zookeeper://127.0.0.1:2181
...@@ -77,23 +55,19 @@ spring: ...@@ -77,23 +55,19 @@ spring:
profiles: pre profiles: pre
dubbo: dubbo:
application: application:
name: ydl-advertise-api name: ydl-auth-api
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
protocol: zookeeper protocol: zookeeper
kafka:
producer:
servers: 172.16.65.81:9091,172.16.65.81:9092,172.16.65.81:9093
--- ---
spring: spring:
profiles: prod profiles: prod
dubbo: dubbo:
application: application:
name: ydl-advertise-api name: ydl-auth-api
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
...@@ -105,23 +79,3 @@ logging: ...@@ -105,23 +79,3 @@ logging:
root: debug root: debug
com.ydl: debug com.ydl: debug
web: debug web: debug
baidu:
app:
upload:
url: https://ocpc.baidu.com/rhine/app/upload
ad:
tooken: jRvLjRUukcR61nzcYFWmwOufyYcYSPOU@S5W6ZISKpvXabnwiS6Lb4MYSZmQDgyRT
redis:
host-name: 10.24.253.1
port: 7389
elasticsearch:
cluster-name: elasticsearch
cluster-nodes: localhost:9300
kafka:
producer:
servers: 172.16.65.81:9091,172.16.65.81:9092,172.16.65.81:9093
\ No newline at end of file
package com.ydl.auth.inf; package com.ydl.auth.inf;
public interface AppAuthFacade { public interface AppAuthFacade {
String getSecretByAppKey(String appKey);
} }
package com.ydl.auth.dto; package com.ydl.auth.po;
import lombok.Data; import lombok.Data;
......
package com.ydl.auth.dto.rsp; package com.ydl.auth.po.rsp;
import lombok.Data; import lombok.Data;
......
...@@ -10,6 +10,25 @@ ...@@ -10,6 +10,25 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>ydl-auth-service</artifactId> <artifactId>ydl-auth-service</artifactId>
<dependencies>
<dependency>
<groupId>com.ydl</groupId>
<artifactId>ydl-auth-inf</artifactId>
<version>0.0.1-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<!--mybatis依赖-->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
</dependency>
</dependencies>
</project> </project>
\ No newline at end of file
package com.ydl.auth.service; package com.ydl.auth.service;
import com.alibaba.dubbo.config.spring.context.annotation.EnableDubbo;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
...@@ -10,11 +11,12 @@ import org.springframework.scheduling.annotation.EnableScheduling; ...@@ -10,11 +11,12 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@Slf4j @Slf4j
@ComponentScan({ "com.ydl" }) @ComponentScan({ "com.ydl" })
@EnableScheduling @EnableScheduling
public class AuthServiceApplication { @EnableDubbo
public class YdlAuthServiceApplication {
public static void main(String[] args) { public static void main(String[] args) {
try { try {
SpringApplication.run(AuthServiceApplication.class, args); SpringApplication.run(YdlAuthServiceApplication.class, args);
} catch (Throwable e) { } catch (Throwable e) {
log.error("",e); log.error("",e);
} }
......
package com.ydl.auth.service.biz; package com.ydl.auth.service.biz;
public interface AppAuthBiz { public interface AppAuthBiz {
String getSecretByAppKey(String appKey);
} }
package com.ydl.auth.service.biz.impl; package com.ydl.auth.service.biz.impl;
public class AppAuthBizImpl { import com.ydl.auth.service.biz.AppAuthBiz;
import com.ydl.auth.service.dao.AppAuthMapper;
import com.ydl.auth.po.AppAuth;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
@Service
public class AppAuthBizImpl implements AppAuthBiz {
@Resource
private AppAuthMapper mapper;
@Override
public String getSecretByAppKey(String appKey) {
Example example = new Example(AppAuth.class);
example.createCriteria().andEqualTo("appKey",appKey);
AppAuth appAuth = mapper.selectOneByExample(example);
return appAuth==null?"":appAuth.getAppSecret();
}
} }
package com.ydl.auth.service.config; package com.ydl.auth.service.config;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig; import com.alibaba.druid.pool.DruidDataSource;
import com.ydl.dbprovider.rds.config.BaseBatisConfig; import com.google.common.collect.Sets;
import com.ydl.dbprovider.rds.config.DbConnectionProperties; import org.apache.ibatis.logging.stdout.StdOutImpl;
import com.ydl.dbprovider.rds.source.DataSourceConfiguration; import org.apache.ibatis.session.AutoMappingBehavior;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.apache.ibatis.session.AutoMappingUnknownColumnBehavior;
import org.apache.ibatis.session.ExecutorType;
import org.apache.ibatis.session.LocalCacheScope;
import org.apache.ibatis.type.JdbcType;
import org.mybatis.spring.SqlSessionFactoryBean;
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.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import tk.mybatis.spring.annotation.MapperScan; import tk.mybatis.spring.annotation.MapperScan;
/** import java.io.IOException;
* Created by yubgou on ${2018年03月20日15:45:02}.
*/
@Configuration @Configuration
@MapperScan("com.ydl.*.service.dao") @MapperScan("com.ydl.*.service.dao")
@EnableApolloConfig(value = {"db-switch.properties","ydl-datasource.yml"}) //从配置中心取配置文件 public class MybatisConfig {
public class MybatisConfig extends BaseBatisConfig { @Bean
public SqlSessionFactoryBean sqlSessionFactoryBean(DruidDataSource druidDataSource,
org.apache.ibatis.session.Configuration configuration) throws IOException {
SqlSessionFactoryBean sqlSessionFactoryBean = new SqlSessionFactoryBean();
sqlSessionFactoryBean.setDataSource(druidDataSource);
sqlSessionFactoryBean.setConfiguration(configuration);
sqlSessionFactoryBean.setTypeAliasesPackage("com.ydl.**.po");
sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver()
.getResources("classpath*:sqlmap/*Mapper.xml"));
return sqlSessionFactoryBean;
}
@Bean("dbConnectionProperties") /**
public DbConnectionProperties dbConnectionProperties(){ * 部分配置,
DbConnectionProperties dbConnectionProperties = new DbConnectionProperties(); * 配置详解:http://www.mybatis.org/mybatis-3/zh/configuration.html
dbConnectionProperties.setMapperLocations("classpath*:sqlmap/*Mapper.xml"); *
dbConnectionProperties.setAliasesPackage("com.ydl.**.po"); * @return
dbConnectionProperties.setDatabaseName("ydl_cooperation"); */
return dbConnectionProperties; @Bean
public org.apache.ibatis.session.Configuration properties() {
org.apache.ibatis.session.Configuration configuration = new org.apache.ibatis.session.Configuration();
configuration.setCacheEnabled(false);
configuration.setLazyLoadingEnabled(false);
configuration.setMultipleResultSetsEnabled(true);
configuration.setUseColumnLabel(true);
configuration.setUseGeneratedKeys(true);
configuration.setAutoMappingBehavior(AutoMappingBehavior.FULL);
configuration.setAutoMappingUnknownColumnBehavior(AutoMappingUnknownColumnBehavior.WARNING);
configuration.setDefaultExecutorType(ExecutorType.REUSE);
configuration.setDefaultStatementTimeout(20000);
configuration.setSafeRowBoundsEnabled(false);
configuration.setMapUnderscoreToCamelCase(true);
configuration.setLogImpl(StdOutImpl.class);
configuration.setLocalCacheScope(LocalCacheScope.SESSION);
configuration.setJdbcTypeForNull(JdbcType.OTHER);
configuration.setLazyLoadTriggerMethods(
Sets.newHashSet("equals", "clone", "hashCode", "toString"));
return configuration;
} }
@Bean @Bean
@ConfigurationProperties(prefix = "spring.datasource") public DataSourceTransactionManager transactionManager(DruidDataSource druidDataSource) {
public DataSourceConfiguration dataSourceConfiguration() { DataSourceTransactionManager dataSourceTransactionManager = new DataSourceTransactionManager();
return new DataSourceConfiguration(); dataSourceTransactionManager.setDataSource(druidDataSource);
return dataSourceTransactionManager;
} }
} }
\ No newline at end of file
...@@ -7,9 +7,6 @@ import org.springframework.context.annotation.Bean; ...@@ -7,9 +7,6 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
/**
* Created by ${汪梓文} on ${2018年03月20日15:45:02}.
*/
@Configuration @Configuration
@EnableConfigurationProperties({ DataSourceProps.class }) @EnableConfigurationProperties({ DataSourceProps.class })
public class DataSourceConfig { public class DataSourceConfig {
......
...@@ -2,9 +2,6 @@ package com.ydl.auth.service.config.source; ...@@ -2,9 +2,6 @@ package com.ydl.auth.service.config.source;
import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Created by ${汪梓文} on ${2018年03月20日15:45:02}.
*/
@ConfigurationProperties("druid.pool") @ConfigurationProperties("druid.pool")
public class DataSourceProps { public class DataSourceProps {
private String userName; private String userName;
......
package com.ydl.auth.service.dao; package com.ydl.auth.service.dao;
public class AppAuthMapper { import com.ydl.common.service.BaseMapper;
import com.ydl.auth.po.AppAuth;
public interface AppAuthMapper extends BaseMapper<AppAuth> {
} }
package com.ydl.auth.service.facade; package com.ydl.auth.service.facade;
public class AppAuthFacadeImpl { import com.alibaba.dubbo.config.annotation.Service;
import com.ydl.auth.inf.AppAuthFacade;
@Service(version = "1.0.0",interfaceClass = AppAuthFacade.class,timeout = 500000)
public class AppAuthFacadeImpl implements AppAuthFacade {
@Override
public String getSecretByAppKey(String appKey) {
return null;
}
} }
server: server:
port: 8089 port: 8090
servlet:
context-path: /ydlAuth
spring: spring:
profiles: profiles:
active: local active: local
application: application:
name: ydl-auth-api name: ydl-auth-service
logging: dubbo:
file: /opt/release/logs/test/${spring.application.name}-DEBUG.log scan:
level: basePackages: com.ydl.auth.service.facade
root: debug
com.ydl: debug #
web: debug #druid:
# pool:
# user-name: ydl
# password: tt12345
# jdbc-url: jdbc:mysql://120.26.213.52:3306/ydl_gateway?zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8&allowMultiQueries=true
# driver-class-name: com.mysql.jdbc.Driver
druid:
pool:
user-name: ydl
password: tt12345
jdbc-url: jdbc:mysql://120.26.213.52:3306/ydl?zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8
driver-class-name: com.mysql.jdbc.Driver
swagger:
dubbo:
application:
version: 1.0.0
groupId: null
artifactId: com.ydl
cluster: rpc
doc: swagger-dubbo
enable: true
--- ---
spring: spring:
profiles: local profiles: local
dubbo: dubbo:
application: application:
name: ydl-auth-api name: ydl-auth-service
registry: registry:
id: zookeeper id: zookeeper
#address: zookeeper://127.0.0.1:2181 address: zookeeper://127.0.0.1:2181
address: zookeeper://47.97.49.44:2181?backup=47.97.49.44:2182,47.97.49.44:2183 #address: zookeeper://47.97.49.44:2181?backup=47.97.49.44:2182,47.97.49.44:2183
protocol: zookeeper protocol: zookeeper
provider:
protocols:
- id: dubbo
name: dubbo
port: 30013
threads: 200
- jsonrpc:
id: jsonrpc
name: jsonrpc
port: 30014
threads: 200
druid:
pool:
user-name: ydl
password: tt12345
jdbc-url: jdbc:mysql://120.26.213.52:3306/ydl_gateway?zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver
logging:
file: logs/${spring.application.name}-DEBUG.log
level:
root: debug
com.ydl: debug
com.ydl.advertise.service.dao: info
--- ---
spring: spring:
profiles: dev profiles: dev
dubbo: dubbo:
application: application:
name: ydl-auth-api name: ydl-auth-service
provider:
registry: registry:
id: zookeeper id: zookeeper
#address: zookeeper://127.0.0.1:2181 #address: zookeeper://127.0.0.1:2181
address: zookeeper://47.97.49.44:2181?backup=47.97.49.44:2182,47.97.49.44:2183 address: zookeeper://47.97.49.44:2181?backup=47.97.49.44:2182,47.97.49.44:2183
#address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 #address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
protocol: zookeeper protocol: zookeeper
protocols:
- id: dubbo
name: dubbo
port: 30013
threads: 200
- jsonrpc:
id: jsonrpc
name: jsonrpc
port: 30014
threads: 200
druid:
pool:
user-name: ydl
password: tt12345
jdbc-url: jdbc:mysql://120.26.213.52:3306/ydl_gateway?zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8&allowMultiQueries=true
driver-class-name: com.mysql.jdbc.Driver
logging:
file: /opt/release/logs/test/${spring.application.name}-DEBUG.log
level:
com.ydl.advertise.service.dao: info
kafka:
producer:
servers: 47.111.174.49:9091
--- ---
spring: spring:
profiles: pre profiles: auto_test
dubbo: dubbo:
application: application:
name: ydl-auth-api name: ydl-auth-service
registry: registry:
id: zookeeper id: zookeeper
# address: zookeeper://127.0.0.1:2181
# address: zookeeper://127.0.0.1:2181?backup=127.0.0.1:2182,127.0.0.1:2183
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
protocol: zookeeper protocol: zookeeper
provider:
protocols:
- id: dubbo
name: dubbo
port: 30013
threads: 200
- jsonrpc:
id: jsonrpc
name: jsonrpc
port: 30014
threads: 200
logging:
file: /opt/release/logs/test/${spring.application.name}-DEBUG.log
---
spring:
profiles: pre
dubbo:
application:
name: ydl-auth-service
provider:
protocols:
- id: dubbo
name: dubbo
port: 30013
threads: 200
- jsonrpc:
id: jsonrpc
name: jsonrpc
port: 30014
threads: 200
logging:
file: /opt/release/logs/pre/${spring.application.name}-DEBUG.log
--- ---
spring: spring:
profiles: prod profiles: prod
dubbo: dubbo:
application: application:
name: ydl-auth-api name: ydl-auth-service
registry: registry:
id: zookeeper id: zookeeper
address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181 address: zookeeper://172.16.1.34:2181?backup=172.16.226.95:2181,172.16.197.219:2181
protocol: zookeeper protocol: zookeeper
provider:
protocols:
- id: dubbo
name: dubbo
port: 30013
threads: 200
- jsonrpc:
id: jsonrpc
name: jsonrpc
port: 30014
threads: 200
logging: druid:
file: /opt/release/logs/prod/${spring.application.name}-DEBUG.log pool:
level: user-name: ydl_co
root: debug password: EBX8&EvQRL#GV4MsmqHi6gfEHO3@$_1Z
com.ydl: debug jdbc-url: jdbc:mysql://rm-bp139aq706gz7bjhg.mysql.rds.aliyuncs.com:3306/ydl_gateway?zeroDateTimeBehavior=convertToNull&characterEncoding=UTF-8&allowMultiQueries=true
web: debug driver-class-name: com.mysql.jdbc.Driver
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.ydl.auth.service.dao.AppAuthMapper">
</mapper>
\ 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