Questions tagged as 'spring'

2
answers

Java Spring Extender @Scheduled to read a file

I have tasks to do as soon as I upload my application, they are executed repeatedly like this: @Scheduled(fixedRate = 10000) public void scheduleFixedRateTask() { System.out.println("Fixed rate task - " + System.currentTimeMillis...
asked by 02.07.2016 / 14:35
1
answer

error: can not find symbol - maven install with class folder

I have a maven project in eclipse that uses a class folder. This folder has .java and .class. The classes I use in the project are in the build path as class folder, when I do maven install gives me error: [ERROR] location: class PushJobProces...
asked by 11.02.2016 / 13:46
1
answer

Generate Runnable Jar from a Maven project

I'm having trouble generating a Jar file for my application from Maven, I followed the following tutorial. Mkyoung.com It even generates the Jar but with a super reduced size and at the time of executing by the CMD it presents the follow...
asked by 08.09.2015 / 15:22
1
answer

Copy OutputStream object to a file

I confess that this is the first time I work with Stream's and File in Java . I currently use Spring in my application, so I use a simple stream utility utility and file's called FileCopyUtils (I do not know if it satisfies m...
asked by 03.02.2015 / 17:51
2
answers

Convert Spring XML declaration to Java code

Can anyone help me convert the Spring XML code that is just below a Java code? <bean id="templateEngine" class="org.thymeleaf.spring3.SpringTemplateEngine"> <property name="templateResolver" ref="templateResolver" /> <pr...
asked by 15.07.2015 / 16:01
0
answers

Problem to write foreign key in table

I'm developing a java web project - using Spring, Thymeleaf, Html, Mysql. In this project I have two classes that are related by foreign key. (Technical and Cargo). In my view (addTechnical.html) I created a combobox using select to fetch the...
asked by 18.08.2018 / 04:11
1
answer

Spring - dependency injection into Thread

I need a little help. I'm doing some tests with Spring Boot and I have my services + some processes that I want to run in thread. Each thread will run its own service. When I do service dependency injection for my main class and step into...
asked by 15.08.2018 / 19:46
2
answers

How to avoid LazyExceptions?

My application faces numerous LazyExceptions issues and what causes a "filth" in the server log. I understand that they occur because the connection to the database has already been closed and I am trying to recover some attribute / object that...
asked by 26.01.2018 / 19:49
1
answer

Validation of number of sessions with spring boot and spring security

I need to validate the number of sessions that may exist, so that the user can not log in to two places at the same time with the same credentials. Reading the Spring Security documentation and posts, I got the implementation below, but it does...
asked by 16.01.2018 / 21:12
0
answers

Scheduled Message Scheduled with cron send three times

Hi! I have a routine in a JSF + Spring 3.0.5 system that sends an email containing 4 attachments in pdfs every day 11 at 7:01 AM to 11 addresses. My problem is that when the application is in production on a 32-bit Windows Server 2003 server, 3...
asked by 11.05.2018 / 15:14