-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Hello,
I am working through Spring in Practice. Right now I'm on sip01, branch 4, SIP page 16. I have a suggestion, one outside the scope of the book, one about the code.
The first suggestion is to put enough in the pom to create an executable jar:
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>com.springinpractice.ch01.ConsoleApp</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Also about the code, it would be cool to allow the jar to read the csv from the jar in resources:
in CsvAccountDao.java
Instead of this:
BufferedReader br = new BufferedReader(new FileReader(csvResource.getFile()));
This:
BufferedReader br = new BufferedReader(new InputStreamReader(csvResource.getInputStream()));
Great book btw, thanks!
Metadata
Metadata
Assignees
Labels
No labels