Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
spring-boot-material
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wxh
spring-boot-material
Commits
60b04139
Commit
60b04139
authored
Nov 06, 2019
by
mergen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix problems
parent
1d2a57f0
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
105 additions
and
41 deletions
+105
-41
pom.xml
+22
-6
src/main/java/com/orhon/smartcampus/material/MaterialApplication.java
+2
-1
src/main/resources/application-k8s.yml
+0
-0
src/main/resources/application-local.yml
+35
-0
src/main/resources/application-testenv.yml
+42
-0
src/main/resources/application.yml
+4
-34
No files found.
pom.xml
View file @
60b04139
...
...
@@ -18,6 +18,10 @@
<druid.version>
1.1.10
</druid.version>
<java.version>
1.8
</java.version>
<fastjson.version>
1.2.46
</fastjson.version>
<spring-cloud.version>
Greenwich.SR2
</spring-cloud.version>
</properties>
<dependencies>
...
...
@@ -103,12 +107,6 @@
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-alibaba-nacos-discovery
</artifactId>
<version>
0.2.1.RELEASE
</version>
</dependency>
<dependency>
<groupId>
org.mapstruct
</groupId>
<artifactId>
mapstruct-jdk8
</artifactId>
<version>
1.3.0.Final
</version>
...
...
@@ -120,7 +118,25 @@
<version>
1.3.0.Final
</version>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
...
...
src/main/java/com/orhon/smartcampus/material/MaterialApplication.java
View file @
60b04139
...
...
@@ -6,6 +6,7 @@ import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.EnableAutoConfiguration
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
...
...
@@ -13,7 +14,7 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
@SpringBootApplication
@ComponentScan
({
"com.alibaba.fastjson.support.spring"
,
"com.orhon.smartcampus.material"
})
@EnableTransactionManagement
@Enable
Discovery
Client
@Enable
Eureka
Client
public
class
MaterialApplication
{
public
static
void
main
(
String
[]
args
)
{
...
...
src/main/resources/application-
dev
.yml
→
src/main/resources/application-
k8s
.yml
View file @
60b04139
File moved
src/main/resources/application-local.yml
0 → 100644
View file @
60b04139
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
#url: jdbc:mysql://39.104.181.104:3311/smartcloud?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
url
:
jdbc:mysql://localhost:3306/material?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
username
:
root
password
:
weixuanhe2233
type
:
com.alibaba.druid.pool.DruidDataSource
#最大活跃数
maxActive
:
20
#初始化数量
initialSize
:
1
#最大连接等待超时时间
maxWait
:
60000
#打开PSCache,并且指定每个连接PSCache的大小ull
poolPreparedStatements
:
true
maxPoolPreparedStatementPerConnectionSize
:
20
#通过connectionProperties属性来打开mergeSql功能;慢SQL记录
#connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
minIdle
:
1
timeBetweenEvictionRunsMillis
:
60000
minEvictableIdleTimeMillis
:
300000
validationQuery
:
select 1 from dual
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
#配置监控统计拦截的filters,去掉后监控界面sql将无法统计,'wall'用于防火墙
filters
:
stat, wall, log4j
#日志
#logging:
# config: classpath:logback-boot.xml
# level:
# com.orhon.smartcampus.modules.*.mapper: DEBUG
src/main/resources/application-testenv.yml
0 → 100644
View file @
60b04139
eureka
:
client
:
service-url
:
defaultZone
:
http://192.168.2.135:30016/eureka
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://39.104.181.104:3308/smartcloud?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
#url: jdbc:mysql://localhost:3306/material?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&useSSL=true
username
:
root
password
:
SmartCampusDB7893
type
:
com.alibaba.druid.pool.DruidDataSource
#最大活跃数
maxActive
:
20
#初始化数量
initialSize
:
1
#最大连接等待超时时间
maxWait
:
60000
#打开PSCache,并且指定每个连接PSCache的大小ull
poolPreparedStatements
:
true
maxPoolPreparedStatementPerConnectionSize
:
20
#通过connectionProperties属性来打开mergeSql功能;慢SQL记录
#connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
minIdle
:
1
timeBetweenEvictionRunsMillis
:
60000
minEvictableIdleTimeMillis
:
300000
validationQuery
:
select 1 from dual
testWhileIdle
:
true
testOnBorrow
:
false
testOnReturn
:
false
#配置监控统计拦截的filters,去掉后监控界面sql将无法统计,'wall'用于防火墙
filters
:
stat, wall, log4j
#日志
#logging:
# config: classpath:logback-boot.xml
# level:
# com.orhon.smartcampus.modules.*.mapper: DEBUG
src/main/resources/application.yml
View file @
60b04139
...
...
@@ -5,18 +5,14 @@ server:
uri-encoding
:
UTF-8
max-threads
:
1000
min-spare-threads
:
30
port
:
80
1
1
port
:
80
3
1
connection-timeout
:
5000
spring
:
application
:
name
:
material-base
# cloud:
# nacos:
# discovery:
# server-addr: 39.104.181.104:8848
name
:
smartcampus-material-112233
profiles
:
active
:
de
v
active
:
testen
v
jackson
:
time-zone
:
GMT+8
date-format
:
yyyy-MM-dd HH:mm:ss
...
...
@@ -25,9 +21,6 @@ spring:
max-file-size
:
100MB
max-request-size
:
100MB
enabled
:
true
# mvc:
# throw-exception-if-no-handler-found: true
# static-path-pattern: /static/**
resources
:
add-mappings
:
false
static-locations
:
/static/
...
...
@@ -36,36 +29,13 @@ spring:
graphql
:
servlet
:
mapping
:
/
graph
ql
mapping
:
/
material-g
ql
enabled
:
true
corsEnabled
:
true
exception-handlers-enabled
:
true
contextSetting
:
PER_REQUEST_WITH_INSTRUMENTATION
maxQueryDepth
:
13
graphiql
:
mapping
:
/graphiql
endpoint
:
graphql
:
/graphql
subscriptions
:
/subscriptions
static
:
basePath
:
/
enabled
:
true
pageTitle
:
GraphiQL
cdn
:
enabled
:
false
version
:
0.11.11
props
:
resources
:
query
:
testquery.query
defaultQuery
:
testquery.query
variables
:
editorTheme
:
"
solarized
light"
headers
:
token
:
"
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzY2hvb2xfaWQiOjEsImV4cCI6MTU2OTM0OTQyOSwidXNlcmlkIjoxLCJ1c2VybmFtZSI6InRlYWNoZXIifQ.zewl-qR-i-pz5VnqUE2SXsoijV4JdUk5f6GbyRuawCk"
altair
:
mapping
:
/altair
endpoint
:
...
...
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