Posts by Fernando Almeida • 315 points
19 posts
-
0
votes1
answer86
viewsA: How does Spring MVC identify Model, View and Controller files?
The prefix and suffix of the files that will be observed may be in Properties as well: spring.mvc.view.prefix= # Spring MVC view prefix. spring.mvc.view.suffix= # Spring MVC view suffix. In…
-
0
votes1
answer690
viewsA: @Autowired does not work with my service
I recommend watching @componantScan, put as attribute basePackage the path of your packages. Also, I recommend annotating your service class with the @Service annotation
-
2
votes2
answers3090
viewsA: Working with application.properties file
Hello, this property should not be at this value: spring.jpa.hibernate.ddl-auto=create-drop In this case it will always "drop" the table and recreate. I recommend if you want to keep the data remove…
-
1
votes2
answers636
viewsA: Request of type Options
Hello. The HTTP OPTIONS method is used so that a client can find out what request options are allowed for a given resource on a server. The client can specify a specific URL in the OPTIONS method or…
-
0
votes2
answers47
viewsA: Latest records based on a filter
As far as I can tell, there’s no way to pull "that hasn’t been tampered with" records from the bank. If someone changes the records it will simply be changed in the bank (it is enough that the…
-
0
votes2
answers203
viewsA: Swagger2 with Springboot. How to separate documentation from source code?
As far as I know there are the two ways you quoted. 1 - Adding the Swagger dependency to the pom.xml of your Spring Boot project; 2 - Creating a YAML/JSON file and using it in an external…
-
1
votes3
answers9910
viewsA: Remove first and last character from a string
you can make a substring of the second character up to the penultimate, this way: String stringCortada = stringOriginal.substring(1, stringOriginal.length()-1);
-
0
votes3
answers569
viewsA: Import a. java into another . java
If both are in the same folder, then they should be in the same package (default access as you declared the class) Try putting in different folders and declaring both classes as "public class"…
-
0
votes2
answers524
viewsA: How can we not lose Session from one tab to another?
I think using sessionStorage is a good option, since this will not perform the persistence of the data, while localStorage will do it. That is, if you restart the browser for example, the…
javascriptanswered Fernando Almeida 315 -
0
votes2
answers1239
viewsA: Pagination with spring date
Hello, you can search the use of Pagerequest of Spring, with it you already call the query passing this object as return(you will pass the offset, the total) and it returns you a pagination already…
-
0
votes1
answer282
viewsA: Use Sublime Text with Eclipse
Hello, as far as I know it is not possible to automatically update the project’s JSP’s by eclipse (if you are in other software, as your case). What you could check is Jrebel, it’s a hotdeploy…
-
0
votes2
answers2434
viewsA: Error while booting application with Spring Boot
Hello, I think it’s almost all right, but whenever I want to apply Hibernate settings I call directly the setHibernateProperties method in the creation of Factory. Follow my example: @Bean public…
-
0
votes1
answer137
viewsA: Problems with improper access to urls in the application with Spring Security
You can create a configuration that will control sessions per user, avoiding the 'session affinity' that your app is creating. For example, define a class that limits one session per person.…
-
0
votes3
answers3880
viewsA: HTTP status 500 Internal server error
I recommend also checking when the server goes up, check if the "/search" method is being registered as GET, because in its initial declaration only @Requestmapping was placed (missing the method…
-
2
votes2
answers286
viewsA: How to avoid memory bursting with recursiveness
You will need to add an output clause. For example checking if Count == 10,000. Another option that can happen naturally is that the machine will run out of memory, or if it has TOO much memory, the…
javaanswered Fernando Almeida 315 -
0
votes2
answers698
viewsA: Java/SQL Login and Password Validation Issue
Hello, it seems: if(rs.getString("Login").equalsIgnoreCase(login) && rs.getString("Senha").equalsIgnoreCase(senha)){ When entering this code block the first time, you call the command break;…
-
3
votes2
answers540
viewsA: Where to store profile images that the user uploaded?
Have you considered hosting on the machine itself? (In the file system?) Because it would be a cheaper cost than the bank, because this has the cost per space higher than a machine. The best…
-
2
votes2
answers369
viewsA: Read Java console string
try (Scanner scanner = new Scanner(System.in)) { System.out.println("Entre com seu nome:"); String nome = scanner.nextLine(); System.out.printf("Seu nome é %s", nome); } catch…
javaanswered Fernando Almeida 315 -
0
votes2
answers89
viewsA: Jboss Multiple context-root pointing even War
I think it is possible yes, I ended up finding this command in case you use jboss 7+ Pin your application via jboss-web.xml to context-root path1 and add rewrite Rule to standalone.xml as Shown:…