Commit 717d301a authored by fangxinjiang's avatar fangxinjiang

init

parent 3c29f5ef
......@@ -65,11 +65,14 @@ public class PermitAllUrlProperties implements InitializingBean, ApplicationCont
// 获取方法上边的注解 替代path variable 为 *
Inner method = AnnotationUtils.findAnnotation(handlerMethod.getMethod(), Inner.class);
Optional.ofNullable(method).ifPresent(inner -> info.getPatternsCondition().getPatterns()
.forEach(url -> urls.add(ReUtil.replaceAll(url, PATTERN, "*"))));
if (null != method && null != info.getPatternsCondition()){
Optional.ofNullable(method).ifPresent(inner -> info.getPatternsCondition().getPatterns()
.forEach(url -> urls.add(ReUtil.replaceAll(url, PATTERN, "*"))));
}
// 获取类上边的注解, 替代path variable 为 *
Inner controller = AnnotationUtils.findAnnotation(handlerMethod.getBeanType(), Inner.class);
if (null != controller && null != info.getPatternsCondition())
Optional.ofNullable(controller).ifPresent(inner -> info.getPatternsCondition().getPatterns()
.forEach(url -> urls.add(ReUtil.replaceAll(url, PATTERN, "*"))));
});
......
......@@ -70,15 +70,15 @@
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!--注册中心客户端-->
<dependency>
<!-- <dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
</dependency>-->
<!--配置中心客户端-->
<dependency>
<!--<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
</dependency>-->
<!-- 阿里云短信下发 -->
<dependency>
<groupId>io.springboot.sms</groupId>
......
......@@ -30,7 +30,6 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
@EnableYifuDoc
@EnableYifuResourceServer
@EnableYifuFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class YifuAdminApplication {
......
server:
port: 4000
# 加解密根密码
jasypt:
encryptor:
password: pig #根密码
# 暴露监控端点
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
health:
show-details: ALWAYS
# feign 配置
feign:
sentinel:
enabled: true
okhttp:
enabled: true
httpclient:
enabled: false
client:
config:
default:
connectTimeout: 10000
readTimeout: 10000
compression:
request:
enabled: true
response:
enabled: true
# mybaits-plus配置
mybatis-plus:
mapper-locations: classpath:/mapper/*Mapper.xml
global-config:
banner: false
db-config:
id-type: auto
table-underline: true
logic-delete-value: 1
logic-not-delete-value: 0
configuration:
map-underscore-to-camel-case: true
# spring security 配置
security:
oauth2:
resource:
loadBalanced: true
token-info-uri: http://yifu-auth/oauth/check_token
# 通用放行URL,服务个性化,请在对应配置文件覆盖
ignore:
urls:
- /v3/api-docs
- /actuator/**
# 文件上传相关 支持阿里云、华为云、腾讯、minio
oss:
endpoint: http://minio.yifu4cloud.com
accessKey: lengleng
secretKey: lengleng
bucket-name: tmp
# swagger 配置
swagger:
enabled: true
title: Yifu Swagger API
gateway: http://${GATEWAY_HOST:yifu-gateway}:${GATEWAY-PORT:9999}
token-url: ${swagger.gateway}/auth/oauth/token
services:
yifu-upms-biz: admin
yifu-codegen: gen
# Spring 相关
spring:
application:
name: @artifactId@
cloud:
nacos:
discovery:
server-addr: ${NACOS_HOST:yifu-register}:${NACOS_PORT:8848}
config:
server-addr: ${spring.cloud.nacos.discovery.server-addr}
---
spring:
config:
import:
- nacos:application-@profiles.active@.yml
- nacos:${spring.application.name}-@profiles.active@.yml
activate:
on-profile: test
redis:
host: yifu-redis
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
---
spring:
config:
activate:
on-profile: dev
redis:
host: yifu-redis
password: '@yf_2017'
datasource:
type: com.zaxxer.hikari.HikariDataSource
driver-class-name: com.mysql.cj.jdbc.Driver
username: root
password: yf_zsk
url: jdbc:mysql://192.168.1.65:22306/yifu_upms?characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowMultiQueries=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
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