Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sv-springboot
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bsoft
sv-springboot
Commits
c858d449
Commit
c858d449
authored
Oct 28, 2019
by
whl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加日志相关配置,及打包war的pom配置,添加nginx.conf,解决跨域
parent
836ef530
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
3 deletions
+71
-3
bsoft-api/src/main/resources/application.properties
+1
-0
bsoft-api/src/main/resources/logback-spring.xml
+3
-3
bsoft-api/src/main/webapp/WEB-INF/web.xml
+5
-0
bsoft-tools/nginx/nginx.conf
+62
-0
No files found.
bsoft-api/src/main/resources/application.properties
View file @
c858d449
spring.application.name
=
bsoftapi
spring.profiles.active
=
test
#server.port=8080
#server.servlet.context-path=/api
...
...
bsoft-api/src/main/resources/logback-spring.xml
View file @
c858d449
...
...
@@ -7,7 +7,7 @@
<property
name=
"log.test.level"
value=
"DEBUG"
/>
<property
name=
"log.prod.level"
value=
"DEBUG"
/>
<property
name=
"log.max.size"
value=
"100MB"
/>
<!-- 日志文件大小 -->
<property
name=
"log.base"
value=
"logs"
/>
<property
name=
"log.base"
value=
"
/
logs"
/>
<springProperty
scope=
"context"
name=
"log.moduleName"
source=
"spring.application.name"
defaultValue=
"app"
/>
<!--控制台输出 -->
...
...
@@ -98,7 +98,7 @@
</root>
</springProfile>
<springProfile
name=
"test"
>
<logger
name=
"
org.ll
"
>
<logger
name=
"
com.bsoft
"
>
<level
value=
"${log.test.level}"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileError"
/>
...
...
@@ -109,7 +109,7 @@
</root>
</springProfile>
<springProfile
name=
"prod"
>
<logger
name=
"
org.ll
"
>
<logger
name=
"
com.bsoft
"
>
<level
value=
"${log.prod.level}"
/>
<appender-ref
ref=
"fileInfo"
/>
<appender-ref
ref=
"fileError"
/>
...
...
bsoft-api/src/main/webapp/WEB-INF/web.xml
View file @
c858d449
...
...
@@ -3,4 +3,8 @@
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
version=
"4.0"
>
<context-param>
<param-name>
webAppRootKey
</param-name>
<param-value>
webApp.appt
</param-value>
</context-param>
</web-app>
\ No newline at end of file
bsoft-tools/nginx/nginx.conf
0 → 100644
View file @
c858d449
worker_processes
1
;
events
{
worker_connections
1024
;
}
http
{
include
mime.types
;
default_type
application/octet-stream
;
server_names_hash_bucket_size
64
;
sendfile
on
;
keepalive_timeout
65
;
server
{
listen
80
;
server_name
localhost
;
location
/
{
root
html
;
index
index.html
index.htm
;
}
error_page
500
502
503
504
/50x.html
;
location
=
/50x.html
{
root
html
;
}
}
server
{
listen
8080
;
server_name
testsoftapi.suvalue.com
;
location
/
{
proxy_pass
http://127.0.0.1:8081
;
proxy_redirect
default
;
proxy_read_timeout
600s
;
add_header
'Access-Control-Allow-Headers'
'Content-Type,Authorization'
;
add_header
'Access-Control-Allow-Origin'
'*'
;
add_header
'Access-Control-Allow-Methods'
'GET,POST'
;
# 获取请求的host
proxy_set_header
Host
$host
;
# 获取请求的ip地址
proxy_set_header
X-Real-IP
$remote_addr
;
# 获取请求的多级ip地址,当请求经过多个反向代理时,会获取多个ip,英文逗号隔开
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for
;
proxy_http_version
1
.1
;
proxy_set_header
Origin
""
;
proxy_set_header
Upgrade
$http_upgrade
;
proxy_set_header
Connection
"upgrade"
;
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment