Skip to content

Commit

Permalink
Merge pull request #149 from pwgit-create/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
pwgit-create committed Jun 25, 2024
2 parents 869cac6 + bf5a022 commit 9e549ce
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions AppWish/AppWish/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>pn.dev</groupId>
<artifactId>code-generator-gui-ollama</artifactId>
<version>1.8</version>
<version>1.8.1</version>
<name>CodeGenerator-GUI</name>


Expand Down Expand Up @@ -45,7 +45,7 @@
<dependency>
<groupId>pn.dev</groupId>
<artifactId>code-generator-ollama</artifactId>
<version>1.8</version>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
Expand Down
6 changes: 3 additions & 3 deletions cg/CodeGenerator/CodeGenerator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>pn.dev</groupId>
<artifactId>code-generator-ollama</artifactId>
<version>1.8</version>
<version>1.8.1</version>


<description>The Java Application-Generator (pn.dev.code-generator-ollama) creates applications by giving a string of your desired features for a Java application, like this: AppSystem.StartCodeGenerator(String appWish)</description>
Expand Down Expand Up @@ -49,7 +49,7 @@
<dependency>
<groupId>io.github.amithkoujalgi</groupId>
<artifactId>ollama4j</artifactId>
<version>1.0.72</version>
<version>1.0.73</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
Expand All @@ -75,7 +75,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<scope>test</scope>
<version>3.1.2</version>
<version>3.3.0</version>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,19 @@ public class PropUtil {
private static final Logger log = LoggerFactory.getLogger(PropUtil.class);


/**
* Extracts a properties file from the project's resource folder and transforms it into a Properties object
* @param fileName The name of the file that contains properties is in the resource folder.
* @return Properties
*/
public static Properties ReadPropertiesFile(String fileName) throws IOException {

Properties properties = null;

FileInputStream fileInputStream = null;

try {

log.info(System.getProperty("user.dir"));

fileInputStream = new FileInputStream(PathConstants.RESOURCE_PATH + fileName);
try (FileInputStream fileInputStream = new FileInputStream(PathConstants.RESOURCE_PATH + fileName)) {
properties = new Properties();
properties.load(fileInputStream);
} catch (IOException ioException) {

ioException.printStackTrace();
} finally {
if (fileInputStream != null) fileInputStream.close();
log.error("Error on reading props file!");
}

return properties;
}
}
}

0 comments on commit 9e549ce

Please sign in to comment.