ENTAXY-480 release version 1.8.3
This commit is contained in:
@ -1,11 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
|
||||
<parent>
|
||||
<groupId>ru.entaxy.esb.platform.runtime.base.connecting</groupId>
|
||||
<artifactId>generator</artifactId>
|
||||
<version>1.8.2.2</version>
|
||||
<version>1.8.3</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* ~~~~~~licensing~~~~~~
|
||||
* ftl-generator
|
||||
* ==========
|
||||
* Copyright (C) 2020 - 2021 EmDev LLC
|
||||
* Copyright (C) 2020 - 2023 EmDev LLC
|
||||
* ==========
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -193,7 +193,7 @@ public class FTLGenerator extends AbstractSelfPublishGenerator<FTLGenerator>
|
||||
Template temp = getTemplateByFullName(templateUrl, templateFullName);
|
||||
Object value = temp.getCustomAttribute(FTLGenerator.ATTR_GENERATED_TYPE);
|
||||
String type = null==value?null:value.toString();
|
||||
log.info("--TEMPLATE--\n" + templateUrl.toString() + templateFullName + "\ngenerated.type: " + (null==value?Generated.GENERATED_TYPE_UNKNOWN:value.toString()));
|
||||
log.debug("--TEMPLATE--\n" + templateUrl.toString() + templateFullName + "\ngenerated.type: " + (null==value?Generated.GENERATED_TYPE_UNKNOWN:value.toString()));
|
||||
try (StringWriter writer = new StringWriter()) {
|
||||
temp.process(params, writer);
|
||||
return enrich(Generated.create(type, writer.toString()))
|
||||
@ -268,9 +268,14 @@ public class FTLGenerator extends AbstractSelfPublishGenerator<FTLGenerator>
|
||||
@Override
|
||||
protected URL getURL(String templateName) {
|
||||
try {
|
||||
if (templateName.contains(":"))
|
||||
return new URL(templateName);
|
||||
return new URL(templateUrl + templateName);
|
||||
} catch (MalformedURLException e) {
|
||||
log.error(e.getMessage(), e);
|
||||
// skip printing typical error
|
||||
// while searching for template
|
||||
if ((templateUrl!=null) || (!"root.ftl".equals(templateName)))
|
||||
log.error(e.getMessage(), e);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
Reference in New Issue
Block a user