Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fuzzBackEnd
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
钱炳权
fuzzBackEnd
Commits
4450c729
Commit
4450c729
authored
a year ago
by
钱炳权
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参数配置开发:访问数据库搭建、列表查询、id查询
parent
cc73d18d
dev
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
216 additions
and
30 deletions
+216
-30
aroundAop.java
...src/main/java/com/example/fuzzControll/aop/aroundAop.java
+2
-4
beforeAop.java
...src/main/java/com/example/fuzzControll/aop/beforeAop.java
+3
-7
CmdConstent.java
.../java/com/example/fuzzControll/constants/CmdConstent.java
+1
-1
FuzzParams.java
...n/java/com/example/fuzzControll/constants/FuzzParams.java
+20
-0
MissionStateEnum.java
.../com/example/fuzzControll/constants/MissionStateEnum.java
+1
-1
MutationConstent.java
.../com/example/fuzzControll/constants/MutationConstent.java
+1
-1
ProtocolConstent.java
.../com/example/fuzzControll/constants/ProtocolConstent.java
+1
-1
ServerClassEnum.java
...a/com/example/fuzzControll/constants/ServerClassEnum.java
+1
-1
TableClassEnum.java
...va/com/example/fuzzControll/constants/TableClassEnum.java
+1
-1
FuzzParamsController.java
...troll/controller/dataController/FuzzParamsController.java
+65
-0
FuzzParamsMapper.java
...ava/com/example/fuzzControll/mapper/FuzzParamsMapper.java
+17
-0
FuzzParamsService.java
...a/com/example/fuzzControll/service/FuzzParamsService.java
+14
-0
AflnetPersistenceServiceImpl.java
...zzControll/service/impl/AflnetPersistenceServiceImpl.java
+0
-4
FuzzParamsServiceImpl.java
...mple/fuzzControll/service/impl/FuzzParamsServiceImpl.java
+52
-0
KittyFuzzPersistenceServiceImpl.java
...ontroll/service/impl/KittyFuzzPersistenceServiceImpl.java
+1
-1
MutationServiceImpl.java
...xample/fuzzControll/service/impl/MutationServiceImpl.java
+1
-3
ProtocolTemplateImpl.java
...ample/fuzzControll/service/impl/ProtocolTemplateImpl.java
+2
-3
SeedFileServiceImpl.java
...xample/fuzzControll/service/impl/SeedFileServiceImpl.java
+1
-1
TestServiceImpl.java
...om/example/fuzzControll/service/impl/TestServiceImpl.java
+1
-1
FuzzParamsMapper.xml
...ntegration/src/main/resources/mapper/FuzzParamsMapper.xml
+31
-0
No files found.
fuzzIntegration/src/main/java/com/example/fuzzControll/aop/aroundAop.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
aop
;
import
com.example.fuzzControll.annotion.NeedCutAround
;
import
com.example.fuzzControll.annotion.NeedCutBefore
;
import
com.example.fuzzControll.constents.MissionStateEnum
;
import
com.example.fuzzControll.constents.TableClassEnum
;
import
com.example.fuzzControll.constants.MissionStateEnum
;
import
com.example.fuzzControll.constants.TableClassEnum
;
import
com.example.fuzzControll.domain.po.MissionInfo
;
import
com.example.fuzzControll.exception.mysqlException.MysqlException
;
import
com.example.fuzzControll.exception.testException.AflnetException
;
...
...
@@ -11,7 +10,6 @@ import com.example.fuzzControll.exception.testException.KittyException;
import
com.example.fuzzControll.tools.system.GlobalClass
;
import
com.example.fuzzControll.tools.system.SystemRunningParams
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.annotation.Around
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/aop/beforeAop.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
aop
;
import
com.example.fuzzControll.annotion.NeedCutBefore
;
import
com.example.fuzzControll.const
e
nts.CmdConstent
;
import
com.example.fuzzControll.const
e
nts.MissionStateEnum
;
import
com.example.fuzzControll.const
e
nts.TableClassEnum
;
import
com.example.fuzzControll.const
a
nts.CmdConstent
;
import
com.example.fuzzControll.const
a
nts.MissionStateEnum
;
import
com.example.fuzzControll.const
a
nts.TableClassEnum
;
import
com.example.fuzzControll.domain.po.MissionInfo
;
import
com.example.fuzzControll.exception.mysqlException.MysqlException
;
import
com.example.fuzzControll.exception.testException.AflnetException
;
...
...
@@ -13,9 +13,7 @@ import com.example.fuzzControll.tools.system.SystemRunningParams;
import
com.example.fuzzControll.tools.test.SingleCmdTools
;
import
lombok.extern.slf4j.Slf4j
;
import
org.aspectj.lang.JoinPoint
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.annotation.Before
;
import
org.aspectj.lang.annotation.Pointcut
;
...
...
@@ -23,9 +21,7 @@ import org.aspectj.lang.reflect.MethodSignature;
import
org.springframework.core.Ordered
;
import
org.springframework.stereotype.Component
;
import
java.lang.annotation.Annotation
;
import
java.lang.reflect.Method
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/const
e
nts/CmdConstent.java
→
fuzzIntegration/src/main/java/com/example/fuzzControll/const
a
nts/CmdConstent.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
const
e
nts
;
package
com
.
example
.
fuzzControll
.
const
a
nts
;
import
com.example.fuzzControll.tools.system.GlobalClass
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/constants/FuzzParams.java
0 → 100644
View file @
4450c729
package
com
.
example
.
fuzzControll
.
constants
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
lombok.Getter
;
import
lombok.Setter
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
@Data
@Getter
@Setter
public
class
FuzzParams
{
private
int
id
;
private
String
params
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
editTime
;
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/const
e
nts/MissionStateEnum.java
→
fuzzIntegration/src/main/java/com/example/fuzzControll/const
a
nts/MissionStateEnum.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
const
e
nts
;
package
com
.
example
.
fuzzControll
.
const
a
nts
;
/**
* 任务运行状态枚举类
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/const
e
nts/MutationConstent.java
→
fuzzIntegration/src/main/java/com/example/fuzzControll/const
a
nts/MutationConstent.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
const
e
nts
;
package
com
.
example
.
fuzzControll
.
const
a
nts
;
/**
* 变异脚本路径
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/const
e
nts/ProtocolConstent.java
→
fuzzIntegration/src/main/java/com/example/fuzzControll/const
a
nts/ProtocolConstent.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
const
e
nts
;
package
com
.
example
.
fuzzControll
.
const
a
nts
;
/**
* 协议模板路径
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/const
e
nts/ServerClassEnum.java
→
fuzzIntegration/src/main/java/com/example/fuzzControll/const
a
nts/ServerClassEnum.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
const
e
nts
;
package
com
.
example
.
fuzzControll
.
const
a
nts
;
/**
* aflnet目标服务路径
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/const
e
nts/TableClassEnum.java
→
fuzzIntegration/src/main/java/com/example/fuzzControll/const
a
nts/TableClassEnum.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
const
e
nts
;
package
com
.
example
.
fuzzControll
.
const
a
nts
;
/**
* 数据库表分类枚举
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/controller/dataController/FuzzParamsController.java
0 → 100644
View file @
4450c729
package
com
.
example
.
fuzzControll
.
controller
.
dataController
;
import
com.example.fuzzControll.constants.FuzzParams
;
import
com.example.fuzzControll.domain.vo.AjaxResult
;
import
com.example.fuzzControll.domain.vo.KittyResult
;
import
com.example.fuzzControll.service.FuzzParamsService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/fuzzParams"
)
@Slf4j
public
class
FuzzParamsController
{
@Autowired
FuzzParamsService
fuzzParamsService
;
/**
* 获取参数列表
*/
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
list
()
{
List
<
FuzzParams
>
results
;
try
{
results
=
fuzzParamsService
.
getFuzzParamsList
();
}
catch
(
Exception
e
)
{
log
.
error
(
"Get params of fuzz error:{}"
,
e
.
getMessage
());
return
AjaxResult
.
error
();
}
return
AjaxResult
.
success
(
results
);
}
/**
* 跟据id获取参数
*/
@RequestMapping
(
value
=
"/getParam/{id}"
,
method
=
RequestMethod
.
GET
)
public
AjaxResult
getById
(
@PathVariable
(
"id"
)
int
id
)
{
FuzzParams
result
;
try
{
result
=
fuzzParamsService
.
getFuzzParamById
(
id
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Get params of fuzz with id error:{}"
,
e
.
getMessage
());
return
AjaxResult
.
error
();
}
return
AjaxResult
.
success
(
result
);
}
/**
* 跟据id修改参数
*/
@RequestMapping
(
value
=
"/editParam"
,
method
=
RequestMethod
.
POST
)
public
AjaxResult
editById
(
@RequestBody
FuzzParams
fuzzParams
)
{
boolean
flag
=
false
;
try
{
flag
=
fuzzParamsService
.
editFuzzParams
(
fuzzParams
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Edit params with id error:{}"
,
e
.
getMessage
());
return
AjaxResult
.
error
();
}
return
AjaxResult
.
success
(
flag
);
}
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/mapper/FuzzParamsMapper.java
0 → 100644
View file @
4450c729
package
com
.
example
.
fuzzControll
.
mapper
;
import
com.example.fuzzControll.constants.FuzzParams
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
@Mapper
@Component
(
"FuzzParamsMapper"
)
public
interface
FuzzParamsMapper
{
void
saveFuzzParams
(
FuzzParams
fuzzParams
);
List
<
FuzzParams
>
getFuzzParamsList
();
FuzzParams
getFuzzParamsById
(
int
id
);
boolean
editFuzzParams
(
FuzzParams
fuzzParams
);
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/FuzzParamsService.java
0 → 100644
View file @
4450c729
package
com
.
example
.
fuzzControll
.
service
;
import
com.example.fuzzControll.constants.FuzzParams
;
import
java.util.List
;
public
interface
FuzzParamsService
{
List
<
FuzzParams
>
getFuzzParamsList
();
FuzzParams
getFuzzParamById
(
int
id
);
//todo 使用切面在运行时插入参数
boolean
saveFuzzParams
(
FuzzParams
fuzzParams
);
boolean
editFuzzParams
(
FuzzParams
fuzzParams
);
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/AflnetPersistenceServiceImpl.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
service
.
impl
;
import
com.example.fuzzControll.conf.AflnetProperties
;
import
com.example.fuzzControll.constents.TableClassEnum
;
import
com.example.fuzzControll.exception.mysqlException.MysqlException
;
import
com.example.fuzzControll.mapper.AflnetMapper
;
import
com.example.fuzzControll.mapper.MissionInfoMapper
;
import
com.example.fuzzControll.domain.vo.AflnetResult
;
import
com.example.fuzzControll.domain.po.MissionInfo
;
import
com.example.fuzzControll.service.AflnetPersistenceService
;
import
com.example.fuzzControll.tools.file.FileTools
;
import
com.example.fuzzControll.tools.system.SystemRunningParams
;
...
...
@@ -15,8 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
@Slf4j
@Service
(
"AflnetPersistenceService"
)
public
class
AflnetPersistenceServiceImpl
implements
AflnetPersistenceService
{
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/FuzzParamsServiceImpl.java
0 → 100644
View file @
4450c729
package
com
.
example
.
fuzzControll
.
service
.
impl
;
import
com.example.fuzzControll.constants.FuzzParams
;
import
com.example.fuzzControll.mapper.FuzzParamsMapper
;
import
com.example.fuzzControll.service.FuzzParamsService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Slf4j
@Service
(
"FuzzParamsService"
)
public
class
FuzzParamsServiceImpl
implements
FuzzParamsService
{
@Autowired
FuzzParamsMapper
fuzzParamsMapper
;
@Override
public
List
<
FuzzParams
>
getFuzzParamsList
()
{
List
<
FuzzParams
>
list
=
null
;
try
{
list
=
fuzzParamsMapper
.
getFuzzParamsList
();
}
catch
(
Exception
e
)
{
log
.
error
(
"FuzzParamsService.getFuzzParamsList error:{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
}
return
list
;
}
@Override
public
FuzzParams
getFuzzParamById
(
int
id
)
{
FuzzParams
fuzzParams
=
null
;
try
{
fuzzParams
=
fuzzParamsMapper
.
getFuzzParamsById
(
id
);
}
catch
(
Exception
e
)
{
log
.
error
(
"FuzzParamsService.getFuzzParamById error:{}"
,
e
.
getMessage
());
throw
new
RuntimeException
(
e
);
}
return
fuzzParams
;
}
@Override
public
boolean
saveFuzzParams
(
FuzzParams
fuzzParams
)
{
return
false
;
}
@Override
public
boolean
editFuzzParams
(
FuzzParams
fuzzParams
)
{
return
fuzzParamsMapper
.
editFuzzParams
(
fuzzParams
);
}
}
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/KittyFuzzPersistenceServiceImpl.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
service
.
impl
;
import
com.example.fuzzControll.conf.KittyProperties
;
import
com.example.fuzzControll.const
e
nts.CmdConstent
;
import
com.example.fuzzControll.const
a
nts.CmdConstent
;
import
com.example.fuzzControll.exception.mysqlException.MysqlException
;
import
com.example.fuzzControll.mapper.KittyMapper
;
import
com.example.fuzzControll.domain.bo.KittyDataParams
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/MutationServiceImpl.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
service
.
impl
;
import
com.example.fuzzControll.annotion.NeedCutAfter
;
import
com.example.fuzzControll.annotion.NeedCutAround
;
import
com.example.fuzzControll.annotion.NeedCutBefore
;
import
com.example.fuzzControll.conf.KittyProperties
;
import
com.example.fuzzControll.const
e
nts.MutationConstent
;
import
com.example.fuzzControll.const
a
nts.MutationConstent
;
import
com.example.fuzzControll.exception.testException.CmdException
;
import
com.example.fuzzControll.exception.testException.FuzzException
;
import
com.example.fuzzControll.domain.bo.TestEntity
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/ProtocolTemplateImpl.java
View file @
4450c729
...
...
@@ -2,10 +2,9 @@ package com.example.fuzzControll.service.impl;
import
com.example.fuzzControll.annotion.NeedCutAround
;
import
com.example.fuzzControll.annotion.NeedCutBefore
;
import
com.example.fuzzControll.conf.KittyProperties
;
import
com.example.fuzzControll.const
e
nts.CmdConstent
;
import
com.example.fuzzControll.const
e
nts.ProtocolConstent
;
import
com.example.fuzzControll.const
a
nts.CmdConstent
;
import
com.example.fuzzControll.const
a
nts.ProtocolConstent
;
import
com.example.fuzzControll.exception.testException.CmdException
;
import
com.example.fuzzControll.exception.testException.FuzzException
;
import
com.example.fuzzControll.domain.bo.TestEntity
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/SeedFileServiceImpl.java
View file @
4450c729
package
com
.
example
.
fuzzControll
.
service
.
impl
;
import
com.example.fuzzControll.conf.AflnetProperties
;
import
com.example.fuzzControll.const
e
nts.CmdConstent
;
import
com.example.fuzzControll.const
a
nts.CmdConstent
;
import
com.example.fuzzControll.exception.testException.CmdException
;
import
com.example.fuzzControll.exception.fileExcption.FileException
;
import
com.example.fuzzControll.service.SeedFileService
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/java/com/example/fuzzControll/service/impl/TestServiceImpl.java
View file @
4450c729
...
...
@@ -2,7 +2,7 @@ package com.example.fuzzControll.service.impl;
import
com.example.fuzzControll.annotion.NeedCutBefore
;
import
com.example.fuzzControll.conf.AflnetProperties
;
import
com.example.fuzzControll.const
e
nts.CmdConstent
;
import
com.example.fuzzControll.const
a
nts.CmdConstent
;
import
com.example.fuzzControll.exception.testException.AflnetException
;
import
com.example.fuzzControll.exception.testException.CmdException
;
import
com.example.fuzzControll.domain.bo.CmdStartParams
;
...
...
This diff is collapsed.
Click to expand it.
fuzzIntegration/src/main/resources/mapper/FuzzParamsMapper.xml
0 → 100644
View file @
4450c729
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.example.fuzzControll.mapper.FuzzParamsMapper"
>
<resultMap
type=
"com.example.fuzzControll.constants.FuzzParams"
id=
"fuzzParams"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"params"
column=
"params"
/>
<result
property=
"editTime"
column=
"editTime"
/>
</resultMap>
<sql
id=
"selectFuzzParams"
>
select id, params,editTime from fuzz_params
</sql>
<insert
id=
"saveFuzzParams"
>
insert into fuzz_params(id, params,editTime) values(#{id}, #{params},#{editTime})
</insert>
<update
id=
"editFuzzParams"
>
</update>
<select
id=
"getFuzzParamsById"
resultMap=
"fuzzParams"
>
<include
refid=
"selectFuzzParams"
/>
where id = #{id}
</select>
<select
id=
"getFuzzParamsList"
resultMap=
"fuzzParams"
>
<include
refid=
"selectFuzzParams"
/>
</select>
</mapper>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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