Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
ysyy
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
ysyy
Commits
7d420b22
提交
7d420b22
authored
6月 24, 2019
作者:
yangzhenguang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
8190a672
隐藏空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
410 行增加
和
0 行删除
+410
-0
.classpath
com.zrqx.zuul/.classpath
+36
-0
.project
com.zrqx.zuul/.project
+35
-0
org.eclipse.core.resources.prefs
com.zrqx.zuul/.settings/org.eclipse.core.resources.prefs
+6
-0
org.eclipse.jdt.core.prefs
com.zrqx.zuul/.settings/org.eclipse.jdt.core.prefs
+8
-0
org.eclipse.m2e.core.prefs
com.zrqx.zuul/.settings/org.eclipse.m2e.core.prefs
+4
-0
org.eclipse.wst.common.project.facet.core.prefs.xml
...tings/org.eclipse.wst.common.project.facet.core.prefs.xml
+7
-0
org.eclipse.wst.common.project.facet.core.xml
...l/.settings/org.eclipse.wst.common.project.facet.core.xml
+5
-0
pom.xml
com.zrqx.zuul/pom.xml
+27
-0
ZuulApplication.java
...rqx.zuul/src/main/java/com/zrqx/zuul/ZuulApplication.java
+17
-0
GateWayCorsConfig.java
...src/main/java/com/zrqx/zuul/config/GateWayCorsConfig.java
+25
-0
application.yml
com.zrqx.zuul/src/main/resources/application.yml
+58
-0
assembly.xml
com.zrqx.zuul/src/main/resources/assembly.xml
+45
-0
bootstrap.yml
com.zrqx.zuul/src/main/resources/bootstrap.yml
+3
-0
logback.xml
com.zrqx.zuul/src/main/resources/logback.xml
+134
-0
没有找到文件。
com.zrqx.zuul/.classpath
0 → 100644
浏览文件 @
7d420b22
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry
including=
"**/*.java"
kind=
"src"
output=
"target/classes"
path=
"src/main/java"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/classes"
path=
"src/main/resources"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"src"
output=
"target/test-classes"
path=
"src/test/java"
>
<attributes>
<attribute
name=
"optional"
value=
"true"
/>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
excluding=
"**"
kind=
"src"
output=
"target/test-classes"
path=
"src/test/resources"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"con"
path=
"org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"
>
<attributes>
<attribute
name=
"maven.pomderived"
value=
"true"
/>
</attributes>
</classpathentry>
<classpathentry
kind=
"output"
path=
"target/classes"
/>
</classpath>
com.zrqx.zuul/.project
0 → 100644
浏览文件 @
7d420b22
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>
com.zrqx.zuul
</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>
org.eclipse.wst.common.project.facet.core.builder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.jdt.core.javabuilder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
org.eclipse.m2e.core.maven2Builder
</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>
com.genuitec.eclipse.springframework.springbuilder
</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>
com.genuitec.eclipse.springframework.springnature
</nature>
<nature>
org.eclipse.jdt.core.javanature
</nature>
<nature>
org.eclipse.m2e.core.maven2Nature
</nature>
<nature>
org.eclipse.wst.common.project.facet.core.nature
</nature>
</natures>
</projectDescription>
com.zrqx.zuul/.settings/org.eclipse.core.resources.prefs
0 → 100644
浏览文件 @
7d420b22
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8
com.zrqx.zuul/.settings/org.eclipse.jdt.core.prefs
0 → 100644
浏览文件 @
7d420b22
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.8
com.zrqx.zuul/.settings/org.eclipse.m2e.core.prefs
0 → 100644
浏览文件 @
7d420b22
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
com.zrqx.zuul/.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
0 → 100644
浏览文件 @
7d420b22
<root>
<facet
id=
"me.spring"
>
<node
name=
"libprov"
>
<attribute
name=
"provider-id"
value=
"spring-no-op-library-provider"
/>
</node>
</facet>
</root>
com.zrqx.zuul/.settings/org.eclipse.wst.common.project.facet.core.xml
0 → 100644
浏览文件 @
7d420b22
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed
facet=
"java"
version=
"1.8"
/>
<installed
facet=
"me.spring"
version=
"4.1"
/>
</faceted-project>
com.zrqx.zuul/pom.xml
0 → 100644
浏览文件 @
7d420b22
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<artifactId>
com.zrqx.zuul
</artifactId>
<name>
com.zrqx.zuul
</name>
<parent>
<groupId>
com.zrqx
</groupId>
<artifactId>
com.zrqx.pom
</artifactId>
<version>
4.0.0
</version>
<relativePath>
../com.zrqx.pom
</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<!-- Springsecurity给服务端提供安全访问 -->
<!-- <dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency> -->
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-zuul
</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
com.zrqx.zuul/src/main/java/com/zrqx/zuul/ZuulApplication.java
0 → 100644
浏览文件 @
7d420b22
package
com
.
zrqx
.
zuul
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.cloud.netflix.zuul.EnableZuulProxy
;
@SpringBootApplication
@EnableEurekaClient
@EnableZuulProxy
public
class
ZuulApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ZuulApplication
.
class
,
args
);
}
}
com.zrqx.zuul/src/main/java/com/zrqx/zuul/config/GateWayCorsConfig.java
0 → 100644
浏览文件 @
7d420b22
package
com
.
zrqx
.
zuul
.
config
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.cors.CorsConfiguration
;
import
org.springframework.web.cors.UrlBasedCorsConfigurationSource
;
import
org.springframework.web.filter.CorsFilter
;
@Component
@Configuration
public
class
GateWayCorsConfig
{
@Bean
public
CorsFilter
corsFilter
()
{
final
UrlBasedCorsConfigurationSource
source
=
new
UrlBasedCorsConfigurationSource
();
final
CorsConfiguration
corsConfiguration
=
new
CorsConfiguration
();
// corsConfiguration.setAllowCredentials(true);
corsConfiguration
.
addAllowedHeader
(
"*"
);
corsConfiguration
.
addAllowedOrigin
(
"*"
);
corsConfiguration
.
addAllowedMethod
(
"*"
);
source
.
registerCorsConfiguration
(
"/**"
,
corsConfiguration
);
return
new
CorsFilter
(
source
);
}
}
com.zrqx.zuul/src/main/resources/application.yml
0 → 100644
浏览文件 @
7d420b22
spring
:
main
:
allow-bean-definition-overriding
:
true
#2.1.0 多个接口上的@FeignClient(“相同服务名”)会报错 ,允许覆盖
mvc
:
static-path-pattern
:
/**
resources
:
static-locations
:
classpath:/static/,classpath:/META-INF/resources/,file:/opt/upload/zygj/
application
:
name
:
zuul
servlet
:
multipart
:
maxFileSize
:
2000Mb
maxRequestSize
:
2000Mb
eureka
:
client
:
service-url
:
defaultZone
:
http://user:123456@127.0.0.1:8861/eureka/
instance
:
preferIpAddress
:
true
hystrix
:
command
:
default
:
execution
:
isolation
:
thread
:
timeoutInMilliseconds
:
240000
ribbon
:
ConnectTimeout
:
60000
ReadTimeout
:
60000
zuul
:
#servlet-path: / #解决文件上传中文乱码 前端请求路径要加 zuul的问题
sensitive-headers
:
Access-Control-Allow-Origin
ignored-headers
:
Access-Control-Allow-Origin,H-APP-Id,Token,APPToken
host
:
connect-timeout-millis
:
60000
socket-timeout-millis
:
60000
routes
:
api-a
:
path
:
/sysuser/**
serviceId
:
sysuser
api-b
:
path
:
/file/**
serviceId
:
file
api-c
:
path
:
/resource/**
serviceId
:
resource
api-d
:
path
:
/order/**
serviceId
:
order
api-e
:
path
:
/third/**
serviceId
:
third
api-f
:
path
:
/member/**
serviceId
:
member
api-g
:
path
:
/pay/**
serviceId
:
pay
com.zrqx.zuul/src/main/resources/assembly.xml
0 → 100644
浏览文件 @
7d420b22
<assembly
xmlns=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.3 http://maven.apache.org/xsd/assembly-1.1.3.xsd"
>
<id>
package
</id>
<formats>
<format>
zip
</format>
</formats>
<includeBaseDirectory>
false
</includeBaseDirectory>
<fileSets>
<fileSet>
<directory>
${basedir}/src/main/resources
</directory>
<includes>
<include>
*.yml
</include>
<include>
*.xml
</include>
<include>
static/**
</include>
<include>
templates/**
</include>
<include>
*.properties
</include>
<include>
*.txt
</include>
</includes>
<filtered>
true
</filtered>
<outputDirectory>
${file.separator}${project.artifactId}
</outputDirectory>
</fileSet>
<fileSet>
<directory>
src/main/resources/runScript
</directory>
<outputDirectory>
${file.separator}bin
</outputDirectory>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/lib
</directory>
<outputDirectory>
${file.separator}${project.artifactId}/lib
</outputDirectory>
<includes>
<include>
*.jar
</include>
</includes>
</fileSet>
<fileSet>
<directory>
${project.build.directory}/
</directory>
<outputDirectory>
${file.separator}${project.artifactId}
</outputDirectory>
<includes>
<include>
*.jar
</include>
</includes>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
com.zrqx.zuul/src/main/resources/bootstrap.yml
0 → 100644
浏览文件 @
7d420b22
server
:
port
:
8808
\ No newline at end of file
com.zrqx.zuul/src/main/resources/logback.xml
0 → 100644
浏览文件 @
7d420b22
<?xml version="1.0" encoding="UTF-8"?>
<configuration
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation=
"http://www.padual.com/java/logback.xsd"
debug=
"false"
scan=
"true"
scanPeriod=
"30 second"
>
<!--读取配置中心的属性-->
<springProperty
scope=
"context"
name=
"name"
source=
"spring.application.name"
/>
<property
name=
"ROOT"
value=
"/opt/logs/zygj/third/"
/>
<property
name=
"FILESIZE"
value=
"10MB"
/>
<property
name=
"MAXHISTORY"
value=
"60"
/>
<property
name=
"DATETIME"
value=
"yyyy-MM-dd HH:mm:ss"
/>
<!-- 控制台打印 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder
charset=
"utf-8"
>
<pattern>
[%-5level] %d{${DATETIME}} [%thread] %logger{36} - %m%n
</pattern>
</encoder>
</appender>
<!-- ERROR 输入到文件,按日期和文件大小 -->
<appender
name=
"ERROR"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder
charset=
"utf-8"
>
<pattern>
[%-5level] %d{${DATETIME}} [%thread] %logger{36} - %m%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${ROOT}%d/error.%i.log
</fileNamePattern>
<maxHistory>
${MAXHISTORY}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${FILESIZE}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<!-- WARN 输入到文件,按日期和文件大小 -->
<appender
name=
"WARN"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder
charset=
"utf-8"
>
<pattern>
[%-5level] %d{${DATETIME}} [%thread] %logger{36} - %m%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
WARN
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${ROOT}%d/warn.%i.log
</fileNamePattern>
<maxHistory>
${MAXHISTORY}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${FILESIZE}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<!-- INFO 输入到文件,按日期和文件大小 -->
<appender
name=
"INFO"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder
charset=
"utf-8"
>
<pattern>
[%-5level] %d{${DATETIME}} [%thread] %logger{36} - %m%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${ROOT}%d/info.%i.log
</fileNamePattern>
<maxHistory>
${MAXHISTORY}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${FILESIZE}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<!-- DEBUG 输入到文件,按日期和文件大小 -->
<appender
name=
"DEBUG"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder
charset=
"utf-8"
>
<pattern>
[%-5level] %d{${DATETIME}} [%thread] %logger{36} - %m%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
DEBUG
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${ROOT}%d/debug.%i.log
</fileNamePattern>
<maxHistory>
${MAXHISTORY}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${FILESIZE}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<!-- TRACE 输入到文件,按日期和文件大小 -->
<appender
name=
"TRACE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<encoder
charset=
"utf-8"
>
<pattern>
[%-5level] %d{${DATETIME}} [%thread] %logger{36} - %m%n
</pattern>
</encoder>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
TRACE
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
${ROOT}%d/trace.%i.log
</fileNamePattern>
<maxHistory>
${MAXHISTORY}
</maxHistory>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<maxFileSize>
${FILESIZE}
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<!-- SQL相关日志输出-->
<logger
name=
"org.mybatis.spring"
level=
"DEBUG"
additivity=
"true"
/>
<!-- Logger 根目录 -->
<root
level=
"INFO"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"DEBUG"
/>
<appender-ref
ref=
"ERROR"
/>
<appender-ref
ref=
"WARN"
/>
<appender-ref
ref=
"INFO"
/>
<appender-ref
ref=
"TRACE"
/>
</root>
</configuration>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论