Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
ejercicio2-framework-back
Project
Project
Details
Activity
Releases
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
Josue
ejercicio2-framework-back
Commits
f9d7499a
Commit
f9d7499a
authored
Jan 05, 2022
by
Roberto Loayza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update aplication.yml and update business parameter deploymente
parent
97cfff9b
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
43 additions
and
54 deletions
+43
-54
pom.xml
pom.xml
+1
-1
HealthController.java
.../java/com/bytesw/bytebot/controller/HealthController.java
+0
-15
ScheduleService.java
...com/bytesw/bytebot/etl/batch/service/ScheduleService.java
+3
-1
SFTPRoute.java
src/main/java/com/bytesw/bytebot/routes/SFTPRoute.java
+5
-5
BucketService.java
src/main/java/com/bytesw/bytebot/service/BucketService.java
+10
-9
OrquestadorService.java
...n/java/com/bytesw/bytebot/service/OrquestadorService.java
+19
-18
application.yml
src/main/resources/application.yml
+5
-5
No files found.
pom.xml
View file @
f9d7499a
...
...
@@ -9,7 +9,7 @@
<packaging>
jar
</packaging>
<properties>
<xdf.version>
3.
3
.0
</xdf.version>
<xdf.version>
3.
4
.0
</xdf.version>
<maven.compiler.source>
1.8
</maven.compiler.source>
<maven.compiler.target>
1.8
</maven.compiler.target>
...
...
src/main/java/com/bytesw/bytebot/controller/HealthController.java
deleted
100644 → 0
View file @
97cfff9b
package
com
.
bytesw
.
bytebot
.
controller
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
@RestController
public
class
HealthController
{
@GetMapping
(
"/health"
)
public
ResponseEntity
<
Void
>
health
()
{
return
new
ResponseEntity
<>(
HttpStatus
.
OK
);
}
}
src/main/java/com/bytesw/bytebot/etl/batch/service/ScheduleService.java
View file @
f9d7499a
...
...
@@ -229,7 +229,7 @@ public class ScheduleService implements SchedulingConfigurer {
}
if
(!
keys
.
isEmpty
())
{
for
(
String
keyTask:
keys
)
{
if
(
!
futureMap
.
get
(
keyTask
).
isCancelled
(
))
{
if
(
futureMap
.
containsKey
(
keyTask
))
{
ScheduledFuture
future
=
futureMap
.
get
(
keyTask
);
future
.
cancel
(
true
);
futureMap
.
remove
(
keyTask
);
...
...
@@ -254,6 +254,8 @@ public class ScheduleService implements SchedulingConfigurer {
if
(
calendarException
.
isPresent
()){
schedulerFlag
=
validateException
(
calendarException
.
get
());
break
;
}
else
{
schedulerFlag
=
true
;
}
}
else
{
schedulerFlag
=
false
;
...
...
src/main/java/com/bytesw/bytebot/routes/SFTPRoute.java
View file @
f9d7499a
...
...
@@ -8,19 +8,19 @@ import org.springframework.stereotype.Component;
@Component
public
class
SFTPRoute
extends
RouteBuilder
{
@Value
(
"${application.
bytebot
-integration.ftp.username}"
)
@Value
(
"${application.
AVB
-integration.ftp.username}"
)
private
String
username
;
@Value
(
"${application.
bytebot
-integration.ftp.password}"
)
@Value
(
"${application.
AVB
-integration.ftp.password}"
)
private
String
password
;
@Value
(
"${application.
bytebot
-integration.ftp.directory:}"
)
@Value
(
"${application.
AVB
-integration.ftp.directory:}"
)
private
String
directory
;
@Value
(
"${application.
bytebot
-integration.ftp.host}"
)
@Value
(
"${application.
AVB
-integration.ftp.host}"
)
private
String
host
;
@Value
(
"${application.
bytebot
-integration.ftp.passiveMode:true}"
)
@Value
(
"${application.
AVB
-integration.ftp.passiveMode:true}"
)
private
boolean
passiveMode
;
@Value
(
"${application.services.multi-tenant:false}"
)
...
...
src/main/java/com/bytesw/bytebot/service/BucketService.java
View file @
f9d7499a
...
...
@@ -25,6 +25,7 @@ import java.io.ByteArrayInputStream;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.InputStream
;
import
java.time.OffsetDateTime
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -72,16 +73,16 @@ public class BucketService {
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
if
(
deployment
.
get
().
getDefaultValue
()
!=
null
)
{
bucketName
=
deployment
.
get
().
getDefaultValue
();
}
else
{
List
<
BusinessParameterConfiguration
>
deploy
=
businessParameterConfigurationRepository
.
findBusinessParameterConfigurationListByBusinessParameter
(
deployment
.
get
().
getId
());
if
(
deploy
.
isEmpty
())
{
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
List
<
BusinessParameterConfiguration
>
deploy
=
businessParameterConfigurationRepository
.
findBusinessParameterConfigurationListByBusinessParameter
(
deployment
.
get
().
getId
());
if
(
deploy
.
isEmpty
())
{
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
if
(
deploy
.
get
(
0
).
getFrom
().
isAfter
(
OffsetDateTime
.
now
()))
{
bucketName
=
deploy
.
get
(
0
).
getValue
();
}
else
if
(
deployment
.
get
().
getDefaultValue
()
!=
null
)
{
bucketName
=
deployment
.
get
().
getDefaultValue
();
}
boolean
result
=
false
;
...
...
src/main/java/com/bytesw/bytebot/service/OrquestadorService.java
View file @
f9d7499a
...
...
@@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
java.time.OffsetDateTime
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -65,16 +66,16 @@ public class OrquestadorService {
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
if
(
deployment
.
get
().
getDefaultValue
()
!=
null
)
{
modeDeployment
=
deployment
.
get
().
getDefaultValue
();
}
else
{
List
<
BusinessParameterConfiguration
>
deploy
=
businessParameterConfigurationRepository
.
findBusinessParameterConfigurationListByBusinessParameter
(
deployment
.
get
().
getId
());
if
(
deploy
.
isEmpty
())
{
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
List
<
BusinessParameterConfiguration
>
deploy
=
businessParameterConfigurationRepository
.
findBusinessParameterConfigurationListByBusinessParameter
(
deployment
.
get
().
getId
());
if
(
deploy
.
isEmpty
())
{
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
if
(
deploy
.
get
(
0
).
getFrom
().
isAfter
(
OffsetDateTime
.
now
()))
{
modeDeployment
=
deploy
.
get
(
0
).
getValue
();
}
else
if
(
deployment
.
get
().
getDefaultValue
()
!=
null
)
{
modeDeployment
=
deployment
.
get
().
getDefaultValue
();
}
//Valida y guarda en base de datos
response
=
fileManagementService
.
saveFile
(
uuid
,
file
);
...
...
@@ -138,16 +139,16 @@ public class OrquestadorService {
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
if
(
deployment
.
get
().
getDefaultValue
()
!=
null
)
{
modeDeployment
=
deployment
.
get
().
getDefaultValue
();
}
else
{
List
<
BusinessParameterConfiguration
>
deploy
=
businessParameterConfigurationRepository
.
findBusinessParameterConfigurationListByBusinessParameter
(
deployment
.
get
().
getId
());
if
(
deploy
.
isEmpty
())
{
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
List
<
BusinessParameterConfiguration
>
deploy
=
businessParameterConfigurationRepository
.
findBusinessParameterConfigurationListByBusinessParameter
(
deployment
.
get
().
getId
());
if
(
deploy
.
isEmpty
())
{
response
.
setMessage
(
"NOT.FOUND.BUSINESS.PARAMETER"
);
throw
new
NotFoundException
();
}
if
(
deploy
.
get
(
0
).
getFrom
().
isAfter
(
OffsetDateTime
.
now
()))
{
modeDeployment
=
deploy
.
get
(
0
).
getValue
();
}
else
if
(
deployment
.
get
().
getDefaultValue
()
!=
null
)
{
modeDeployment
=
deployment
.
get
().
getDefaultValue
();
}
if
(
model
.
getStatus
().
equals
(
StatusBcdEnum
.
CARGADO
.
getName
()))
{
...
...
src/main/resources/application.yml
View file @
f9d7499a
spring.autoconfigure.exclude
:
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration, org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration, org.springframework.boot.autoconfigure.jms.JmsAutoConfiguration
server
:
servlet.context-path
:
${APPLICATION_PATH:/
bytebot
}
servlet.context-path
:
${APPLICATION_PATH:/
AVB
}
port
:
${APPLICATION_PORT:9077}
web
:
#static-content-location: file:/home/mgutierrez/Documentos/Bytesw/bytebot-workspace/dist/bytebot-html/
static-content-location
:
file:/home/mgutierrez/Descargas/dist/bytebot-html/
static-content-location
:
file:/home/mgutierrez/Descargas/dist
-20/dist
/bytebot-html/
#NOTA debe terminar con /
security
:
...
...
@@ -72,7 +72,7 @@ application:
messaging
:
queue-test
:
action_queue.fifo
topic-test
:
topic-test
bytebot
-integration
:
AVB
-integration
:
ftp
:
host
:
localhost
username
:
ftp
...
...
@@ -129,7 +129,7 @@ spring:
hikari.registerMbeans
:
true
security
:
basepath
:
http://localhost:9077/
bytebot
basepath
:
http://localhost:9077/
AVB
provider
:
byte
# oracle, amazon
oauth2-client
:
clientId
:
xdf-client
...
...
@@ -156,7 +156,7 @@ spring:
testWhileIdle
:
true
hikari.registerMbeans
:
true
security
:
basepath
:
http://localhost:9077/
bytebot
basepath
:
http://localhost:9077/
AVB
provider
:
byte
# oracle, amazon
oauth2-client
:
clientId
:
xdf-client
...
...
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