Questions tagged as 'spring'

2
answers

what the LOG class is for

I was reviewing code, and I see all the LOG class is to login? @Component class ApplicationEventListener { @SuppressWarnings("unused") private static Logger LOG = LoggerFactory.getLogger(ApplicationEventListener.class); and inv...
asked by 08.05.2017 / 18:12
1
answer

Java inject external service

I am using this project in the pom of my application: <dependency> <groupId>com.girotan.notification</groupId> <artifactId>notification-service-rest-client</artifactId> <version>0.0.1-SNAPSHOT<...
asked by 26.04.2017 / 23:29
2
answers

dependency not found maven

Good I have a problem I try to add a dependency, but this marks me the following    [ERROR] /root/evolplus/backendEvol/evolplus/icova/icova-service/src/main/java/com/applying/icova/service/IdeaServiceImpl.java:[10,42] package org.apach...
asked by 14.03.2017 / 03:35
2
answers

use method post to add a record

According to what each method has its objective:    post to insert records,       get to get / show records,       put to modify records,       delete to delete records I made the following code, which adds a new book to the bd then I...
asked by 01.05.2017 / 00:23
1
answer

how does maping work in spring?

I have the following code: import java.util.List; import org.springframework.data.repository.Repository; import net.javabeat.spring.data.domain.Book; public interface BookNamedQueryRepositoryExample extends Repository<Book, Long> {...
asked by 01.05.2017 / 06:52
1
answer

@Async does not work in Spring

From a web application with spring I want to send emails, and I want to do it asynchronously. For this I want to use the annotation @Async of spring. This is the configuration I have: servlet-context.xml <!-- DispatcherServlet Context...
asked by 18.12.2016 / 11:46
1
answer

It is possible to use a @Resource defined in the same class @Configuration

I have something like this: The class Other needs an instance of MyBean so create the attribute and use it when I create the bean Other @Configuration public SomeClass { @Resource private MyBean b; @A...
asked by 20.02.2016 / 00:16
2
answers

Delete user by ID

I have the following link <div class="col-md-8"> <a href="borrarUsuario/${session.userData.id}">Borrar Usuario</a> </div> This is the controller method that clears @RequestMapping(value="/borrarUsuario/{id}",me...
asked by 21.11.2018 / 09:00
1
answer

How to add restrictions to object of type "Criteria" when the criterion attribute is of an external class?

I have the following dilemma to generate a list of all the credentials that belong to a specific physical host. Class FisicHost @Entity @Transactional public class FisicHost { @Id @GeneratedValue(strategy = GenerationType.IDENTIT...
asked by 06.11.2018 / 21:50
1
answer

Error sending an email

Mail Class that sends the mail package com.example.demo.controllers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; i...
asked by 22.11.2018 / 21:31