Posts by nullptr • 3,925 points
142 posts
-
1
votes1
answer496
viewsA: Disable Flyway migrate on startup and run only when requested
To disable Flyway during startup you can include the following parameter in your application.properties: spring.flyway.enabled=false This will disable Flyway autoconfiguration Edit :) You can create…
-
2
votes1
answer353
viewsA: Problem running application
You don’t own the class org.hibernate.dialect.MyDialect in your classpath. Given the Mysql dependencies I assume you want to use this database. Change your bean as below: @Bean public…
-
9
votes1
answer689
viewsA: Difference between @Deprecated and @deprecated
@Deprecated is an annotation interpreted at compile time to indicate that the method/class is deprecated. This will generate warnings and markups in the IDE when you use a deprecated feature.…
-
1
votes1
answer44
viewsA: How to set fields on pages
A good reading of this documentation at this link, I’ll copy the report structure from there: When I structure Ports, I follow the following rule: I have the master, which will include some of the…
-
2
votes3
answers165
viewsA: Why authenticate your cell phone number via text in the register?
Why authenticate by SMS? Because SMS is one of the standard methods of authentication, documented in RFC 8176. Brings a little extra security? Yes, this involves another authentication factor in…
-
0
votes2
answers162
viewsA: Failure in dependency injection
Due to integration with Spring, you need to make some changes to your code: Utilise @Component instead of @ManagedBean Utilise @Scope("prototype") instead of @ViewScoped You can use @Autowired…
-
1
votes1
answer306
viewsA: Unknown Spring Boot Error
I did some more research and managed to simulate this problem, in fact it is a problem in the Eclipse itself, more specifically in the m2e connector, as you describe this bug. There are two…
-
0
votes2
answers468
viewsA: Doubt Springboot + Restful
The mistake that really matters in stacktrace is this: com.fasterxml.jackson.databind.JsonMappingException: Multiple back-reference properties with name 'defaultReference' You own or have added…
-
1
votes2
answers2116
viewsA: Tomcat V8.5 not booting, error: Child container failed During start
The error is actually lower: Caused by: java.util.zip.ZipException: invalid LOC header (bad signature) at java.util.zip.ZipFile.read(Native Method) at…
-
2
votes1
answer241
viewsA: Where to place the @Produces and @Consumes annotation? In the method or class?
In the example you showed, the two will end up resulting in the same configuration. The difference in adoption should be exclusively related to your need. My controller will always consume and…
-
1
votes1
answer108
viewsA: Mapping with Inheritancetype.JOINED Does not work
I believe you’ve found the Issue HHH-10490 The recommendation would be to change the Hibernate configuration to use catalog instead of schema, you could change then of: <property…
-
2
votes1
answer316
viewsA: How to schedule several tasks in spring boot dynamically?
For this you can use Spel I put a model down where I’m wearing @Scheduled for scheduling the job, in it I am injecting a bean containing the fetched property of the database containing the cron…
-
6
votes1
answer281
viewsA: counter how many times the program was executed in C
Looking at the documentation of fopen: "w+" write/update: Create an Empty file and open it for update (Both for input and output). If a file with the same name already exists its Contents are…
-
3
votes2
answers2987
viewsA: "For Development purposes only" error with google maps
Google Maps is no longer free as it was a while ago, they changed the usage strategy in 2018. For more information on pricing and usage you can check this link Now the reasons for the tag to appear…
-
6
votes1
answer205
viewsA: How much does an HTTP request cost?
Yes user spent data, you can simulate this behavior by doing your own experiment as shown below: For that I used the Postman and the Webhook.: By performing a POST for the generated Webhook URL, you…
-
2
votes1
answer351
viewsA: How to start a process in spring-boot after injecting all the Beans and before you start listening to external events?
Fala Jefferson, You can accomplish this using Annotation @Eventlistener, it acts as Systener to execute certain method depending on the generated boot event. The events derive from Applicationevent,…
-
3
votes1
answer84
viewsA: Quickly access exact element instance within List java
Your solution meets the requirements, but it will not get satisfactory performance the more your list of elements grow. Some structures provide us algorithms (remember that structures do not have…
-
0
votes1
answer97
viewsA: Limit the size of Linkedhashmap
Instead of adding the values to an external map, you should use the stream output operations themselves. In your case this will be solved by collecting the result of limit as follows: Map<String,…
-
1
votes3
answers63
viewsA: Java Doubts - Creating Classes(Objects)
All kinds nonprimitive (classes, arrays, interfaces...) have null default value. All kinds primitive of language NAY start with null value. This can be seen in documentation: In your case the…
-
1
votes1
answer136
views -
1
votes1
answer514
viewsA: How to use Spring Data Binding Object for Snake case attributes while maintaining the Java Naming Conventions standard?
A good idea is to create a filter that converts Snake case values to Camel case (or any other format). This filter will be run for every request, and will handle the parameters accordingly and pass…
-
0
votes2
answers64
viewsA: Unable to find Primefaces component
Currently Servlet mapping is only for urls /faces/* Add the following mapping to web.xml: <servlet-mapping> <servlet-name>Faces Servlet</servlet-name>…
-
1
votes1
answer88
viewsA: Paging appear in JSF Primafeces Datatable only when you have more than one page
Following the documentation of Primefaces 6.1, you can use the attribute paginatorAlwaysVisible to hide if the table does not display the number of records required for paging: Here is a translation…
-
1
votes1
answer277
views -
13
votes1
answer2490
viewsA: Does the REST standard allow the use of query string?
REST is an architectural style that uses HTTP as a representative form, so it does both allow and supports the use of query strings. Several libraries have options to include query strings during…
-
0
votes1
answer86
viewsQ: Definition of Publisher-Subscriber and Observer standards
Today I was evaluating a article (English) concerning the differences between the Observer and Publisher-Subscriber standards, I had until then the view that both were the same thing! Even quoting…
-
16
votes2
answers596
viewsQ: Why is there such a difference in performance between stream and normal loops?
I was reading a article related to the performance of streams/loops, and was startled by the difference in performance between the use of loops for large quantities of data. I decided to perform a…
-
0
votes1
answer709
viewsA: Customization Spring Security 403
You could create an Handler and treat a specific exception for these occasions, for example: @ControllerAdvice public class AppExceptionHandler { @ExceptionHandler(value =…
-
0
votes1
answer144
viewsA: java.lang.Noclassdeffounderror: org/codehaus/groovy/Runtime/Bytecodeinterface8
Make sure your subreport is not configured with Groovy instead of Java: In the Properties tab, change the Language / Language attribute from Groovy to Java…
-
0
votes2
answers120
viewsA: Springboot - @Autowired null in configuration file
In the AppProperties you should be using @Configuration instead of @Component. Your prefix configuration is right, I believe the problem is just the wrong Annotation.…
-
3
votes1
answer1394
viewsA: Add External Library . JAR, to MAVEN project using VSCODE?
For cases where the library is customized, and not available in any repository (internal company or internet), you must install the JAR locally (for its development). Installation in the local…
-
0
votes2
answers148
viewsA: Item selected in p:selectOneMenu reaches null in Systener
On the first question: Description not available on @Managedbean Evaluating the code of TipoRelatoConverter, in fact the description is not being used: Long id = Long.parseLong(string); TipoRelato…
-
1
votes2
answers101
viewsA: Scheduling problem for sending notices by e-mail Spring and Javamailsender
Probably your problem is in multiple instances of your Scheduler being executed at the same time. Some considerations: If you configure your application through XML and Annotations, it may be that…
-
2
votes2
answers57
viewsA: Page displaying error
In the link of your JSP, you should indicate the context of your application, as the example below: <a href="${pageContext.request.contextPath}/hello/controller/"> Hello </a> The…
-
3
votes1
answer560
viewsA: Map returning repeated values
Let’s go in parts, the first point to highlight is related to the functioning of HashMap, it is important to say that he does not accept duplicate keys. The presentation of equal keys is due to the…
-
4
votes2
answers2034
viewsA: Why doesn’t Spring boot use Entitymanager?
Spring Boot has a number of built-in, ready-to-use features in its libs, making it easy to set-up by creating everything from scratch. As described in the documentation: The Spring Framework…
-
0
votes2
answers806
viewsA: How to deserialize Json Springboot webservice
From what I’ve seen you deserializando a List<Cotacao> and not a Movie as you included in the question, probably the return JSON is not a list and you are trying to deserialize to list. Edit…
-
1
votes3
answers2698
viewsA: Using 2 versions of Java
You can use the command start to call your program and close the prompt with exit: start "C:\Program Files (x86)\Java\jdk1.6.0_17\bin\java" -jar ChoppHouse.jar exit I managed to start Squirrel on my…
-
0
votes2
answers2085
viewsA: Line break inside a table cell
I had a problem with breaking lines and I managed to solve with this only this style below: white-space: pre-wrap;
-
0
votes3
answers1359
viewsA: How to resolve ERROR: HHH000346: Error During Managed flush [org.hibernate.Exception.Sqlgrammarexception: could not execute statement]
You have not noted your columns correctly when you do not use Annotation @Column(name="MINHACOLUNA") by default Hibernate will consider the name of the class property. I noticed the column in the…
-
0
votes1
answer887
viewsA: Error creating project in Maven
This error occurs due to Maven searching for the dependency in the configured repository and finding no dependency available. Try to configure a Central Repository and run the command again. For…
-
1
votes1
answer673
viewsA: How to Handle Exceeded Maximum File Upload Size
I believe you are using Spring Boot for your application, following the documentation I see some other properties being used: spring.servlet.multipart.max-file-size=200MB…