Questions tagged as 'annotation'

1
answer

Class attribute with pre-determined values

I want to create a class attribute for the gender ( M or F ), which by default the person can already select. Is it possible to create an array with these values ( M and F ) already default without typing, or should I do this in the same lay...
asked by 18.01.2017 / 23:23
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

How to map a column that does not exist in the database?

I'm having a small problem mapping (JPA) columns to a class in my system. I have some procedures in the bank that do a lot already and I would not like to stop using them, but I do not know how to map. SELECT r.*, ultimo_documento(r.id) as ult...
asked by 06.10.2016 / 05:00
1
answer

How to configure ASP.NET MVC validation to accept dates pt-BR?

I can not set the formatting of dates on my forms. I've tried several cases, all using the same view: @Html.EditorFor(model => model.Data, new { htmlAttributes = new { @class = "form-control" } }) Case 1: Clean and raw public DateTim...
asked by 18.09.2015 / 21:17
2
answers

Annotation problem for mapping

I'm having errors due to my mapping to my program in java, I'm still starting to mess with annotation (please forgive possible stupid errors xD). The error should be in @ ManyToOne / OneToMany ... I have two tables, ACCOUNT and PLAYER. After...
asked by 18.11.2016 / 16:54
1
answer

How do I accept 0 and negative values in decimal attribute using DataAnnotations?

I have a class with decimals that can receive a value of -10.00 to 10.00 ( including 0 ), equivalent is a numeric (5.2) . The problem is that when creating my MetaData class, even specifying the range validation has not worked. Home Not...
asked by 29.07.2015 / 15:34
1
answer

Validate with object annotations within a method

I have a JavaBean with several attributes, and they need to be validated. It has an attribute of type enum, and according to the value of this attribute, the object needs some specific validations, and there are validations that are independent...
asked by 26.07.2016 / 23:21
0
answers

A help with annotations with Spring Boot

A help with annotations ... Today my tests are like this: @ConfigA @ConfigB @ConfigC @ConfigD public class MeuTesteA {} @ConfigA @ConfigB @ConfigC @ConfigD public class MeuTesteB {} See, I have to repeat many configuration annotations. To...
asked by 18.05.2018 / 21:45
1
answer

The import org.springframework.web.bind.annotation.CrossOrigin can not be resolved

I'm not able to import the annotation @CrossOrigin . Ide does not find the required package even though all other annotations are working normally. The error that occurs is this:    The import org.springframework.web.bind.annotation.C...
asked by 08.02.2017 / 23:33
1
answer

Format mask for TimeStamp attribute

I need to display the value of the TIMEOUT attribute only HH: mm (hour and minutes). By including the masks below an error occurs: The input string was not in an incorrect format. I've tried both ways: @dia.HORAINICIO.ToString(@"hh:mm...
asked by 02.11.2015 / 15:19