Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
N
notes2.0
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zjm
notes2.0
Commits
73b802b5
提交
73b802b5
authored
3月 12, 2020
作者:
gongwenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of git.yfzx.zjtys.com.cn:zjm/notes2.0
上级
3b7fc912
ca8078b9
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
102 行增加
和
67 行删除
+102
-67
WorkController.java
...com/zjty/tynotes/job/basic/controller/WorkController.java
+6
-16
ScoreCoefficient.java
...y/tynotes/job/basic/entity/database/ScoreCoefficient.java
+1
-1
Work.java
...java/com/zjty/tynotes/job/basic/entity/database/Work.java
+1
-1
ScRo.java
.../java/com/zjty/tynotes/job/basic/entity/request/ScRo.java
+1
-1
UpdateWorkload.java
...zjty/tynotes/job/basic/entity/request/UpdateWorkload.java
+25
-0
WorkVo.java
...va/com/zjty/tynotes/job/basic/entity/response/WorkVo.java
+1
-1
ScoreCoefficientService.java
...ty/tynotes/job/basic/service/ScoreCoefficientService.java
+2
-2
WorkService.java
.../java/com/zjty/tynotes/job/basic/service/WorkService.java
+1
-1
WorkServiceImpl.java
.../zjty/tynotes/job/basic/service/impl/WorkServiceImpl.java
+25
-4
Init.java
notes-pas/src/main/java/com/zjty/tynotes/pas/task/Init.java
+29
-28
UnionApplication.java
...rc/main/java/com/zjty/tynotes/union/UnionApplication.java
+10
-12
没有找到文件。
notes-job/src/main/java/com/zjty/tynotes/job/basic/controller/WorkController.java
浏览文件 @
73b802b5
...
@@ -2,6 +2,7 @@ package com.zjty.tynotes.job.basic.controller;
...
@@ -2,6 +2,7 @@ package com.zjty.tynotes.job.basic.controller;
import
com.zjty.tynotes.job.basic.entity.database.Work
;
import
com.zjty.tynotes.job.basic.entity.database.Work
;
import
com.zjty.tynotes.job.basic.entity.request.UpdateCrew
;
import
com.zjty.tynotes.job.basic.entity.request.UpdateCrew
;
import
com.zjty.tynotes.job.basic.entity.request.UpdateWorkload
;
import
com.zjty.tynotes.job.basic.entity.request.WorkRo
;
import
com.zjty.tynotes.job.basic.entity.request.WorkRo
;
import
com.zjty.tynotes.job.basic.entity.response.JobResponse
;
import
com.zjty.tynotes.job.basic.entity.response.JobResponse
;
import
com.zjty.tynotes.job.basic.entity.response.WorkIsNotCommit
;
import
com.zjty.tynotes.job.basic.entity.response.WorkIsNotCommit
;
...
@@ -118,22 +119,11 @@ public class WorkController {
...
@@ -118,22 +119,11 @@ public class WorkController {
@PutMapping
(
value
=
"/upDate/Workload"
)
@PutMapping
(
value
=
"/upDate/Workload"
)
@ApiOperation
(
value
=
"修改任务的工作量、考评系数."
)
@ApiOperation
(
value
=
"修改任务的工作量、考评系数."
)
@ApiImplicitParams
({
public
ResponseEntity
<
JobResponse
>
updateWorkload
(
@RequestBody
UpdateWorkload
updateWorkload
)
{
@ApiImplicitParam
(
name
=
"workId"
,
value
=
"任务id"
,
dataType
=
"String"
,
paramType
=
"query"
,
required
=
true
),
@ApiImplicitParam
(
name
=
"workload"
,
value
=
"工作量"
,
dataType
=
"int"
,
paramType
=
"query"
,
required
=
true
),
businessTreeManagement
.
saveAction
(
updateWorkload
.
getUserId
(),
updateWorkload
.
getWorkId
(),
Action
.
UPDATE_WORKLOAD
,
new
Date
(),
updateWorkload
.
getMsg
());
@ApiImplicitParam
(
name
=
"userId"
,
value
=
"人员id"
,
dataType
=
"String"
,
paramType
=
"query"
,
required
=
true
),
workService
.
updateWorkload
(
updateWorkload
.
getWorkId
(),
updateWorkload
.
getWorkload
(),
updateWorkload
.
getWorkCoefficient
());
@ApiImplicitParam
(
name
=
"workCoefficient"
,
value
=
"考评系数"
,
dataType
=
"int"
,
paramType
=
"query"
,
required
=
true
),
return
ok
(
new
JobResponse
(
updateWorkload
.
getWorkId
()));
@ApiImplicitParam
(
name
=
"msg"
,
value
=
"消息"
,
dataType
=
"String"
,
paramType
=
"query"
,
required
=
true
)
})
public
ResponseEntity
<
JobResponse
>
updateWorkload
(
@RequestParam
String
workId
,
@RequestParam
String
userId
,
@RequestParam
int
workCoefficient
,
@RequestParam
int
workload
,
@RequestParam
String
msg
)
{
businessTreeManagement
.
saveAction
(
userId
,
workId
,
Action
.
UPDATE_WORKLOAD
,
new
Date
(),
msg
);
workService
.
updateWorkload
(
workId
,
workload
,
workCoefficient
);
return
ok
(
new
JobResponse
(
workId
));
}
}
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/entity/database/ScoreCoefficient.java
浏览文件 @
73b802b5
...
@@ -50,5 +50,5 @@ public class ScoreCoefficient {
...
@@ -50,5 +50,5 @@ public class ScoreCoefficient {
* 最终工作量
* 最终工作量
*/
*/
@ApiModelProperty
(
value
=
"最终工作量"
,
example
=
"endWorkLoad"
)
@ApiModelProperty
(
value
=
"最终工作量"
,
example
=
"endWorkLoad"
)
private
int
endWorkLoad
;
private
Double
endWorkLoad
;
}
}
notes-job/src/main/java/com/zjty/tynotes/job/basic/entity/database/Work.java
浏览文件 @
73b802b5
...
@@ -136,7 +136,7 @@ public class Work {
...
@@ -136,7 +136,7 @@ public class Work {
* 考评系数
* 考评系数
*/
*/
@ApiModelProperty
(
value
=
"考评系数"
,
example
=
"0.8"
)
@ApiModelProperty
(
value
=
"考评系数"
,
example
=
"0.8"
)
private
in
t
workCoefficient
=
0
;
private
floa
t
workCoefficient
=
0
;
/**
/**
* 是否记录个人工作量
* 是否记录个人工作量
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/entity/request/ScRo.java
浏览文件 @
73b802b5
...
@@ -49,7 +49,7 @@ public class ScRo {
...
@@ -49,7 +49,7 @@ public class ScRo {
* 最终工作量
* 最终工作量
*/
*/
@ApiModelProperty
(
value
=
"最终工作量"
,
example
=
"endWorkLoad"
)
@ApiModelProperty
(
value
=
"最终工作量"
,
example
=
"endWorkLoad"
)
private
int
endWorkLoad
;
private
Double
endWorkLoad
;
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"userId"
)
@ApiModelProperty
(
value
=
"用户id"
,
example
=
"userId"
)
private
String
userId
;
private
String
userId
;
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/entity/request/UpdateWorkload.java
0 → 100644
浏览文件 @
73b802b5
package
com
.
zjty
.
tynotes
.
job
.
basic
.
entity
.
request
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.springframework.web.bind.annotation.RequestParam
;
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"修改任务考评以及工作量"
,
description
=
"修改任务考评以及工作量数据对象"
)
public
class
UpdateWorkload
{
@ApiModelProperty
(
value
=
"任务id"
,
example
=
"workId"
)
private
String
workId
;
@ApiModelProperty
(
value
=
"修改人的id"
,
example
=
"userId"
)
private
String
userId
;
@ApiModelProperty
(
value
=
"考评系数"
,
example
=
"workCoefficient"
)
private
float
workCoefficient
;
@ApiModelProperty
(
value
=
"工作量"
,
example
=
"workload"
)
private
int
workload
;
@ApiModelProperty
(
value
=
"描述"
,
example
=
"msg"
)
private
String
msg
;
}
notes-job/src/main/java/com/zjty/tynotes/job/basic/entity/response/WorkVo.java
浏览文件 @
73b802b5
...
@@ -117,7 +117,7 @@ public class WorkVo {
...
@@ -117,7 +117,7 @@ public class WorkVo {
* 考评系数
* 考评系数
*/
*/
@ApiModelProperty
(
value
=
"考评系数"
,
example
=
"0.8"
)
@ApiModelProperty
(
value
=
"考评系数"
,
example
=
"0.8"
)
private
in
t
workCoefficient
=
0
;
private
floa
t
workCoefficient
=
0
;
/**
/**
* 是否记录个人工作量
* 是否记录个人工作量
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/service/ScoreCoefficientService.java
浏览文件 @
73b802b5
...
@@ -33,9 +33,9 @@ public interface ScoreCoefficientService {
...
@@ -33,9 +33,9 @@ public interface ScoreCoefficientService {
/**
/**
* 查找指定id的考评信息
* 查找指定
work
id的考评信息
*
*
* @param id
指定
id
* @param id
work
id
* @return ScoreCoefficient 对象
* @return ScoreCoefficient 对象
*/
*/
ScoreCoefficient
findById
(
String
id
);
ScoreCoefficient
findById
(
String
id
);
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/service/WorkService.java
浏览文件 @
73b802b5
...
@@ -111,7 +111,7 @@ public interface WorkService {
...
@@ -111,7 +111,7 @@ public interface WorkService {
* @param workload 工作量
* @param workload 工作量
* @param workCoefficient 考评系数 只能修改0.1-0.2
* @param workCoefficient 考评系数 只能修改0.1-0.2
*/
*/
void
updateWorkload
(
String
taskId
,
int
workload
,
in
t
workCoefficient
);
void
updateWorkload
(
String
taskId
,
int
workload
,
floa
t
workCoefficient
);
/**
/**
...
...
notes-job/src/main/java/com/zjty/tynotes/job/basic/service/impl/WorkServiceImpl.java
浏览文件 @
73b802b5
package
com
.
zjty
.
tynotes
.
job
.
basic
.
service
.
impl
;
package
com
.
zjty
.
tynotes
.
job
.
basic
.
service
.
impl
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Lists
;
import
com.zjty.tynotes.job.basic.entity.database.ScoreCoefficient
;
import
com.zjty.tynotes.job.basic.entity.database.Work
;
import
com.zjty.tynotes.job.basic.entity.database.Work
;
import
com.zjty.tynotes.job.basic.entity.response.WorkIsNotCommit
;
import
com.zjty.tynotes.job.basic.entity.response.WorkIsNotCommit
;
import
com.zjty.tynotes.job.basic.entity.response.WorkVo
;
import
com.zjty.tynotes.job.basic.entity.response.WorkVo
;
import
com.zjty.tynotes.job.basic.repository.WorkRepository
;
import
com.zjty.tynotes.job.basic.repository.WorkRepository
;
import
com.zjty.tynotes.job.basic.service.ConversionService
;
import
com.zjty.tynotes.job.basic.service.ConversionService
;
import
com.zjty.tynotes.job.basic.service.ScoreCoefficientService
;
import
com.zjty.tynotes.job.basic.service.WorkService
;
import
com.zjty.tynotes.job.basic.service.WorkService
;
import
com.zjty.tynotes.job.basic.utils.WorkingTime
;
import
com.zjty.tynotes.job.basic.utils.WorkingTime
;
import
com.zjty.tynotes.job.common.constant.WorkStatus
;
import
com.zjty.tynotes.job.common.constant.WorkStatus
;
...
@@ -19,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -19,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.text.DecimalFormat
;
import
java.text.ParseException
;
import
java.text.ParseException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Date
;
...
@@ -49,6 +52,10 @@ public class WorkServiceImpl implements WorkService {
...
@@ -49,6 +52,10 @@ public class WorkServiceImpl implements WorkService {
@Autowired
@Autowired
ConversionService
conversionService
;
ConversionService
conversionService
;
@Autowired
ScoreCoefficientService
scoreCoefficientService
;
@Autowired
@Autowired
public
WorkServiceImpl
(
WorkRepository
workRepository
)
{
public
WorkServiceImpl
(
WorkRepository
workRepository
)
{
this
.
workRepository
=
workRepository
;
this
.
workRepository
=
workRepository
;
...
@@ -132,20 +139,34 @@ public class WorkServiceImpl implements WorkService {
...
@@ -132,20 +139,34 @@ public class WorkServiceImpl implements WorkService {
Float
practical
=
score
(
ob
.
getStateTime
(),
ob
.
getEndTime
());
Float
practical
=
score
(
ob
.
getStateTime
(),
ob
.
getEndTime
());
if
(
expect
<
practical
){
if
(
expect
<
practical
){
float
time
=
practical
-
expect
;
float
time
=
practical
-
expect
;
beyond
(
1
,
1.0f
,
time
);
ob
.
setWorkCoefficient
(
beyond
(
1
,
1.0f
,
time
)
);
//添加
//添加
}
else
if
(
expect
.
equals
(
practical
)){
}
else
if
(
expect
.
equals
(
practical
)){
ob
.
setWorkCoefficient
(
1
f
);
//添加
//添加
}
else
{
}
else
{
float
time
=
expect
-
practical
;
float
time
=
expect
-
practical
;
advance
(
1
,
1.0f
,
time
);
ob
.
setWorkCoefficient
(
advance
(
1
,
1.0f
,
time
)
);
}
}
}
if
(
status
.
equals
(
WorkStatus
.
FINISHED
)){
pWorkload
(
taskId
);
}
}
workRepository
.
save
(
ob
);
workRepository
.
save
(
ob
);
}
}
private
void
pWorkload
(
String
workId
){
ScoreCoefficient
scoreCoefficient
=
scoreCoefficientService
.
findById
(
workId
);
int
workLoad
=
findBySuperoirIdCount
(
workId
);
DecimalFormat
df
=
new
DecimalFormat
(
"#.##"
);
double
coefficient
=
(
Double
.
parseDouble
(
scoreCoefficient
.
getScore1
())+
Double
.
parseDouble
(
scoreCoefficient
.
getScore2
()))/
2.0
/
100.0
;
double
getWorkLoad
=
workLoad
*
coefficient
;
scoreCoefficient
.
setEndWorkLoad
(
Double
.
valueOf
(
df
.
format
(
getWorkLoad
)));
scoreCoefficientService
.
modify
(
scoreCoefficient
);
}
private
float
beyond
(
float
count
,
float
coefficient
,
Float
time
){
private
float
beyond
(
float
count
,
float
coefficient
,
Float
time
){
if
(
coefficient
<
0.5f
){
if
(
coefficient
<
0.5f
){
return
0.5f
;
return
0.5f
;
...
@@ -202,7 +223,7 @@ return null;
...
@@ -202,7 +223,7 @@ return null;
}
}
@Override
@Override
public
void
updateWorkload
(
String
taskId
,
int
workload
,
in
t
workCoefficient
)
{
public
void
updateWorkload
(
String
taskId
,
int
workload
,
floa
t
workCoefficient
)
{
Work
ob
=
workRepository
.
findById
(
taskId
).
get
();
Work
ob
=
workRepository
.
findById
(
taskId
).
get
();
ob
.
setWorkload
(
workload
);
ob
.
setWorkload
(
workload
);
ob
.
setWorkCoefficient
(
workCoefficient
);
ob
.
setWorkCoefficient
(
workCoefficient
);
...
...
notes-pas/src/main/java/com/zjty/tynotes/pas/task/Init.java
浏览文件 @
73b802b5
...
@@ -46,39 +46,39 @@ public class Init implements CommandLineRunner {
...
@@ -46,39 +46,39 @@ public class Init implements CommandLineRunner {
List
<
Authority
>
authorities1
=
new
ArrayList
<>();
List
<
Authority
>
authorities1
=
new
ArrayList
<>();
List
<
Authority
>
authorityList
=
authorityDao
.
findAll
();
List
<
Authority
>
authorityList
=
authorityDao
.
findAll
();
List
<
String
>
authorityName
=
new
ArrayList
<>();
List
<
String
>
authorityName
=
new
ArrayList
<>();
if
(
authorityList
!=
null
)
{
if
(
authorityList
!=
null
)
{
for
(
Authority
authority
:
authorityList
)
{
for
(
Authority
authority
:
authorityList
)
{
authorityName
.
add
(
authority
.
getName
());
authorityName
.
add
(
authority
.
getName
());
}
}
}
}
if
(!
authorityName
.
contains
(
"查看任务"
))
{
if
(!
authorityName
.
contains
(
"查看任务"
))
{
authorities1
.
add
(
new
Authority
(
null
,
"查看任务"
,
"能够查看员工的任务"
));
authorities1
.
add
(
new
Authority
(
null
,
"查看任务"
,
"能够查看员工的任务"
));
}
}
if
(!
authorityName
.
contains
(
"发布任务"
))
{
if
(!
authorityName
.
contains
(
"发布任务"
))
{
authorities1
.
add
(
new
Authority
(
null
,
"发布任务"
,
"能够发布任务给其他用户"
));
authorities1
.
add
(
new
Authority
(
null
,
"发布任务"
,
"能够发布任务给其他用户"
));
}
}
if
(!
authorityName
.
contains
(
"分解任务"
))
{
if
(!
authorityName
.
contains
(
"分解任务"
))
{
authorities1
.
add
(
new
Authority
(
null
,
"分解任务"
,
"对任务具有分解的功能"
));
authorities1
.
add
(
new
Authority
(
null
,
"分解任务"
,
"对任务具有分解的功能"
));
}
}
if
(!
authorityName
.
contains
(
"删除任务"
))
{
if
(!
authorityName
.
contains
(
"删除任务"
))
{
authorities1
.
add
(
new
Authority
(
null
,
"删除任务"
,
"能够对任务进行删除"
));
authorities1
.
add
(
new
Authority
(
null
,
"删除任务"
,
"能够对任务进行删除"
));
}
}
if
(!
authorityName
.
contains
(
"修改任务"
))
{
if
(!
authorityName
.
contains
(
"修改任务"
))
{
authorities1
.
add
(
new
Authority
(
null
,
"修改任务"
,
"能够对任务进行修改"
));
authorities1
.
add
(
new
Authority
(
null
,
"修改任务"
,
"能够对任务进行修改"
));
}
}
if
(!
authorityName
.
contains
(
"查看人员"
))
{
if
(!
authorityName
.
contains
(
"查看人员"
))
{
authorities1
.
add
(
new
Authority
(
null
,
"查看人员"
,
"能够查看人员"
));
authorities1
.
add
(
new
Authority
(
null
,
"查看人员"
,
"能够查看人员"
));
}
}
if
(
authorities1
!=
null
)
{
if
(
authorities1
!=
null
)
{
authorityDao
.
saveAll
(
authorities1
);
authorityDao
.
saveAll
(
authorities1
);
}
}
//
// iRoleService.deleteAll();
//
//
iRoleService.deleteAll();
User
user
=
pasUserDao
.
findByUsername
(
"root"
);
User
user
=
pasUserDao
.
findByUsername
(
"root"
);
System
.
out
.
println
(
user
);
System
.
out
.
println
(
user
);
if
(
user
!=
null
)
{
if
(
user
!=
null
)
{
List
<
UserRole
>
userRoles
=
userRoleDao
.
findAllByUserId
(
user
.
getId
());
List
<
UserRole
>
userRoles
=
userRoleDao
.
findAllByUserId
(
user
.
getId
());
List
<
String
>
roleIds
=
new
ArrayList
<>();
List
<
String
>
roleIds
=
new
ArrayList
<>();
for
(
UserRole
userRole
:
userRoles
)
{
for
(
UserRole
userRole
:
userRoles
)
{
...
@@ -96,16 +96,16 @@ public class Init implements CommandLineRunner {
...
@@ -96,16 +96,16 @@ public class Init implements CommandLineRunner {
}
}
user
.
setRoles
(
roleList
);
user
.
setRoles
(
roleList
);
root
=
user
;
root
=
user
;
}
else
{
}
else
{
System
.
out
.
println
(
"77777777777777777"
);
System
.
out
.
println
(
"77777777777777777"
);
this
.
root
=
new
User
();
this
.
root
=
new
User
();
Role
role
=
new
Role
(
null
,
"管理员"
,
"管理系统的人员"
,
null
,
null
,
null
);
Role
role
=
new
Role
(
null
,
"管理员"
,
"管理系统的人员"
,
null
,
null
,
null
);
List
<
Authority
>
authorities
=
new
ArrayList
<>();
List
<
Authority
>
authorities
=
new
ArrayList
<>();
Authority
authority2
=
new
Authority
(
null
,
"用户管理"
,
"无"
);
Authority
authority2
=
new
Authority
(
null
,
"用户管理"
,
"无"
);
Authority
authority1
=
new
Authority
(
null
,
"权限管理"
,
"无"
);
Authority
authority1
=
new
Authority
(
null
,
"权限管理"
,
"无"
);
Authority
authority3
=
new
Authority
(
null
,
"角色管理"
,
"无"
);
Authority
authority3
=
new
Authority
(
null
,
"角色管理"
,
"无"
);
Authority
authority4
=
new
Authority
(
null
,
"考勤管理"
,
"无"
);
Authority
authority4
=
new
Authority
(
null
,
"考勤管理"
,
"无"
);
Authority
authority5
=
new
Authority
(
null
,
"部门管理"
,
"无"
);
Authority
authority5
=
new
Authority
(
null
,
"部门管理"
,
"无"
);
authorities
.
add
(
authority2
);
authorities
.
add
(
authority2
);
authorities
.
add
(
authority1
);
authorities
.
add
(
authority1
);
...
@@ -129,17 +129,17 @@ public class Init implements CommandLineRunner {
...
@@ -129,17 +129,17 @@ public class Init implements CommandLineRunner {
String
id
=
role1
.
getId
();
String
id
=
role1
.
getId
();
List
<
RoleAuthority
>
roleAuthorities
=
new
ArrayList
<>();
List
<
RoleAuthority
>
roleAuthorities
=
new
ArrayList
<>();
for
(
Authority
authority
:
authorities2
)
{
for
(
Authority
authority
:
authorities2
)
{
roleAuthorities
.
add
(
new
RoleAuthority
(
null
,
id
,
authority
.
getId
()));
roleAuthorities
.
add
(
new
RoleAuthority
(
null
,
id
,
authority
.
getId
()));
}
}
roleAuthorityDao
.
saveAll
(
roleAuthorities
);
roleAuthorityDao
.
saveAll
(
roleAuthorities
);
User
save
=
pasUserDao
.
save
(
this
.
root
);
User
save
=
pasUserDao
.
save
(
this
.
root
);
UserRole
userRole
=
new
UserRole
(
null
,
save
.
getId
(),
id
);
UserRole
userRole
=
new
UserRole
(
null
,
save
.
getId
(),
id
);
userRoleDao
.
save
(
userRole
);
userRoleDao
.
save
(
userRole
);
//
this.root.setPassword("root");
this
.
root
.
setPassword
(
"root"
);
}
}
;
;
// User user1 = new User();
// User user1 = new User();
// user1.createUser();
// user1.createUser();
...
@@ -200,5 +200,6 @@ public class Init implements CommandLineRunner {
...
@@ -200,5 +200,6 @@ public class Init implements CommandLineRunner {
// job.setName("岗位1");
// job.setName("岗位1");
//
//
// iJobService.addJob(job);
// iJobService.addJob(job);
// }
}
}
}
}
notes-union/src/main/java/com/zjty/tynotes/union/UnionApplication.java
浏览文件 @
73b802b5
...
@@ -27,9 +27,7 @@ public class UnionApplication {
...
@@ -27,9 +27,7 @@ public class UnionApplication {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
UnionApplication
.
class
,
args
);
SpringApplication
.
run
(
UnionApplication
.
class
,
args
);
}
}
// 开始支持http
// 开始支持http
@Bean
@Bean
public
ServletWebServerFactory
servletContainer
()
{
public
ServletWebServerFactory
servletContainer
()
{
TomcatServletWebServerFactory
tomcat
=
new
TomcatServletWebServerFactory
();
TomcatServletWebServerFactory
tomcat
=
new
TomcatServletWebServerFactory
();
...
@@ -37,14 +35,14 @@ public class UnionApplication {
...
@@ -37,14 +35,14 @@ public class UnionApplication {
return
tomcat
;
return
tomcat
;
}
}
private
Connector
createHTTPConnector
()
{
private
Connector
createHTTPConnector
()
{
Connector
connector
=
new
Connector
(
"org.apache.coyote.http11.Http11NioProtocol"
);
Connector
connector
=
new
Connector
(
"org.apache.coyote.http11.Http11NioProtocol"
);
//同时启用http(8080)、https(8443)两个端口
//同时启用http(8080)、https(8443)两个端口
connector
.
setScheme
(
"http"
);
connector
.
setScheme
(
"http"
);
connector
.
setSecure
(
false
);
connector
.
setSecure
(
false
);
connector
.
setPort
(
8084
);
connector
.
setPort
(
8084
);
connector
.
setRedirectPort
(
8289
);
connector
.
setRedirectPort
(
8289
);
return
connector
;
return
connector
;
}
}
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论