Textdateien mit Spring Batch erzeugen

Wir wollen eine Datei über Spring batch erzeugen. Hierfür benötigen wir einen Marshaller mir „Reader“ und „Writer“.

Der Reader:

<bean id="fileReader">
  <property name="dataSource" ref="dataSource" />
  <property name="sql" value="SELECT * FROM table" />
  <property name="rowMapper">
    <bean class="de.package.rowmapper.FileRowMapper" />
  </property>
</bean>

Read More

Create text files with spring batch

To create a file over spring batch, first you need a marshaller with a Reader and a Writer.

The Reader:

<bean id="fileReader">
  <property name="dataSource" ref="dataSource" />
  <property name="sql" value="SELECT * FROM table" />
  <property name="rowMapper">
    <bean class="de.package.rowmapper.FileRowMapper" />
  </property>
</bean>

Read More

Daten sicher versenden mit SFTP und Spring Batch

Datenversand mit spring batch in auf viele Weisen möglich. Der bekannteste Weg ist der Versand von XML-Dateien aber das Springframework bietet auch eine Menge anderer Möglichkeiten an. Einer Dieser Wege ist der sichere Datenversand über SFTP. Für diesen Fall müssen wir das Spring integration Framework verwenden.Read More

Secure data sending with sftp and spring batch

It is possible to send data with spring batch in several ways. The most used case is sending XML files, but the spring framework offers you a lot of other ways too. One of these ways is to send your data files secure by using SFTP. For this use case you can use the spring integration framework.Read More

Send Email by Spring batch with variable attachments

It is very simple to send an Email with attachments by Spring batch framework.

Firstly you need 3 beans for handling the email:
– The first bean initializes JavaMail and sets all needed properties

<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    <property name="host" value="smtp.yourEmailDomain.de"/>
    <property name="port" value="25"/>
    <property name="username" value="yourUserName"/>
    <property name="password" value="yourPassword"/>
    <property name="javaMailProperties">
        <props>
            <prop key="mail.smtp.auth">true</prop>
        </props>
    </property>
</bean>
Read More

Preserve your mail form for spam

Somehow it is really a tie, that some silly people tries to use other mail forms to send. In the best behaviour, this spam only reaches your own mail account, in the worst way the whole world gest the spam mail from your account. But there is a nice invention called captcha which helps you to preserve your mail from for this kind of spam, which is mostly send by so called bots.Read More