Questions tagged as 'java'

0
answers

TLS 1.2 in Spring Java

Does anyone know how to configure for the Java application to use TLS 1.2? Is this setting done in the Java application or the server? I'm using Spring 3.1 Thank you     
asked by 26.04.2018 / 17:44
1
answer

How to override equals so that it compares: primitive objects and keys (int, String, double)

Can you make the comparison in any way? because in my code, if it is not int or Object the program throws an exception. To be able to use in the method contains the SortSequenceNonOrder class. Person Class public class Pessoa implements Com...
asked by 26.04.2018 / 20:36
1
answer

Report always prints in A4 format

I'm creating the whole report at runtime, however, at the time of printing it is not respecting the size I set. In%% of it displays right, but the printer or ReportViewer does not print correctly. Code: static void Imprimir(int imp...
asked by 05.04.2018 / 21:24
0
answers

Error in Spring Framework: Could not find or load main class

I'm following some classes from a Spring workshop, but I can not continue because of the error: The main class could not be found or loaded. Below is the code that contains the main function: / p> package com.algaworks.vinhos; import org.spr...
asked by 16.04.2018 / 20:27
1
answer

Error in project: JSF does not respond and neither does it show Message

I'm in a JSF project from the Java for Web book. It was doing fine, but I put the following code in JSF that, according to updates, should not work because the facelets-taglib-jsf20-spring- 3 has been removed, according to the book. Code below...
asked by 17.04.2018 / 03:06
1
answer

How to print a table-shaped array in nodejs on the console?

How do I get the same output of this array, written in Java, in NodeJS ? public class Matriz { public static void main(String[] args) { int[][] m = new int[4][4]; for (int i = 0; i < m.length ; i++) { for...
asked by 16.04.2018 / 19:31
0
answers

Unit Testing - How to test a try-with-resources?

I'd like to know the best way - or the standard way - to test a try-with-resources ; with Test Cases for each of the Exceptions that can be released (simulating the launch of each of these Exceptions to see how the tested code will behave), and...
asked by 17.03.2018 / 03:16
1
answer

Problems with friendly url in spring mvc

Including a last page in my project I got a url problem, of which I could not identify the problem. JSF Scenario: Module Condition: href="customer service" Customer Details: href="client / $ {nrPasta}" Module Condition: href="customer...
asked by 16.03.2018 / 13:25
1
answer

How to optimize Hibernate query

I'm developing a JAVA system and I use Hibernate to generate my queries with the bank. I need to solve the following problem: I have some classes that belong to an entity and I need to execute a method that returns me some fields of the class...
asked by 09.03.2018 / 18:01
0
answers

Task execution with app not started [duplicate]

I want to make an app that will make queries from time to time in an API that returns JSON , processes and creates a notification. It would be the same as Whatsapp, which even closed (without being open or in the task manager) will ru...
asked by 09.03.2018 / 13:27