Posts by Jose Vieira Neto • 2,560 points
78 posts
-
1
votes1
answer220
viewsA: Service Discovery Eureka Netflix
I found the solution: You register your micro service via REST. https://github.com/Netflix/eureka/wiki/Eureka-REST-operations Example of json: { "instance": { "hostName": "rails-checkin", "app":…
-
2
votes1
answer220
viewsQ: Service Discovery Eureka Netflix
I have an architecture SOA with two stacks different with java and other with ruby, I have a microservice using spring boot and other Rails, and I’m trying to set up a Discovery Service with Eureka…
-
0
votes1
answer1621
viewsQ: regex java replace all
String url = "/users/{id}/books/{id_book}"; url = url.replaceAll("{\\w*}", "\\w*"); System.out.println("result url:" + url); Trying to replace with regex, and returns me the following error:…
-
0
votes1
answer57
viewsQ: URI Rest with Httpservlet
So, guys, I’m developing a mini framework for study purposes, using the Java front controller, and I came across the following problem. First of all I’ll explain how it’s working. I embed the Jetty…
-
2
votes3
answers1757
viewsA: Problem creating script . sh to enter a directory
The problem was that I created the script in Windows and sent it to the linux machine to run the .sh :D :D I created the script on vi and worked perfectly. "Unix uses Different line feeds and…
-
1
votes3
answers1757
viewsQ: Problem creating script . sh to enter a directory
I am creating a script. sh that the first step is to enter a directory. 1. #!/bin/bash cd /home/salariosbrasil/consulta-ninja #git pull pwd this directory exists and yet the cd doesn’t work.. but if…
-
1
votes0
answers77
viewsQ: Good practices with $.get from jquery
I believe it is not recommended to make one $.get within a $.get. But then what would be the best practice for this code below: var valorSalario = getSalarioAtual(location.state);…
-
12
votes1
answer3396
viewsQ: How does authentication with digital certificate work?
I want to authenticate via digital certificate in a web application. I have been able to read the data of my digital certificate that is connected to my machine. The question is: "How to…
-
2
votes2
answers104
viewsQ: bootstrapValidator.js with jsf does not work
My validation script using bootstrapValidator.js <h:outputScript library="primefaces" name="jquery/jquery.js" target="head" /> <h:outputScript library="primefaces"…
-
0
votes1
answer216
viewsQ: I cannot inject Mockmvc into integration test [Spring Boot]
@RunWith(SpringRunner.class) @SpringBootTest public class CustomerRestTest { private static final String BASE_URL = "http://localhost:8080"; @Autowired private…
-
33
votes3
answers3113
viewsQ: Why is it mandatory to implement "public Static void main (String [] args)"?
Why it is mandatory to implement this method in a Java application?
-
4
votes2
answers70
viewsQ: $. GET Jquery Dùvida
I have the method: RepoApi.prototype.getContributors = function() { var returnList = []; $.get(this.url).done(function(response) { console.log(response); returnList = response;…
-
2
votes1
answer54
viewsA: Error when registering in Mysql
Check if you are setando the user id at the time of his transaction. he’s complaining that the fk user can not be null.…
-
2
votes1
answer113
viewsQ: Spring Loaded is not working
I have a Spring 3.1.4 project and I’m setting up the spring-loaded follows the image below: The Tomcat performs well but the spring-loaded is not working any change I have to raise Tomcat again.…
-
4
votes1
answer987
viewsQ: Notifications with Spring
how to implement a system of notifications that receive an example notification counter in real time: My question is that when it is inserted there in the bank one more line and go from 4 to 5…
-
0
votes1
answer91
viewsQ: Error when injecting Service within a @Component
Set an example bean: @Component public class SimulationModelFactory { and within the class I am injecting my service example: @Autowired private SimulationFlowService simulationFlowService; Service…
-
6
votes2
answers7668
viewsQ: What does the @Component annotation do?
What Spring actually does when we write it down @Component in a class? How does it work "underneath the scenes"
-
1
votes1
answer235
viewsQ: Ionic push notifcation error
I’m doing an Ionic project to receive notifications (android) and I’m using the phonegap-plugin-push plugin. var push = PushNotification.init({ "android": {"senderID": "860498722229", icon :…
-
2
votes1
answer79
viewsA: $http error with Ionic and spring
I found the bug the problem is CROS to troubleshoot creates a configuration class: package br.com.example.config; import java.io.IOException; import javax.servlet.Filter; import…
-
2
votes1
answer79
viewsQ: $http error with Ionic and spring
have an API with spring framework follows the method below: @RequestMapping(value = "/users", method = RequestMethod.GET) public @ResponseBody ResponseEntity<List<Usuario>> listUsers ()…
-
1
votes0
answers31
viewsQ: How does the eclipse create a project?
I want to understand how the eclipse generates a project Which folders are required within the project directory ? eg: src/ What files does it generate to identify which is a project eclipse ? How…
-
4
votes2
answers9897
viewsQ: What is JPA’s mappedBy for?
Example: @OneToMany(mappedBy = "chemical", fetch = FetchType.LAZY) @LazyCollection(LazyCollectionOption.EXTRA) @JsonIgnore private List<SimulationChemicals> simulationChemicals; Why is the use…
-
2
votes1
answer603
viewsQ: Variable type for precise calculations (JAVA)
What is the best type of variable for very precise calculations ? I’ve used double and Bigdecimal and the rounding is diverging much in the end result.
-
4
votes3
answers790
viewsQ: Increase Precision with Bigdecimal Java
Entrances R = new BigDecimal(2.79E+00); Dxm3d = new BigDecimal(3.99E-04); Wmd = new BigDecimal(2.39E-03); x = new BigDecimal(3.2); t = new BigDecimal(365); Below is the formula BigDecimal…
-
2
votes3
answers221
viewsA: cep - fields disabled for user
Just use the property disabled. <input id="numero" type="text" disabled="disabled" /> <input id="cidade" type="text" disabled="disabled" /> <input id="logradouro" type="text"…
-
4
votes1
answer376
viewsQ: Comparison of Bigdecimal result with Float (Java)
I have two formulas implemented, one with the Bigdecimal type and the other with the primitive double type, but the results differ and I am not able to find the solution. Below are the formulas:…
-
3
votes1
answer105
viewsA: Complementary error function in java?
Add this dependency to the project. <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-math3</artifactId> <version>3.2</version>…
-
3
votes1
answer226
viewsA: How to implement Service Layer with Spring?
The service layer is where you will have all your business rules before persistence and of course where you will control the database transaction. //declare aqui a anotação service @Service public…
-
1
votes1
answer105
viewsQ: Complementary error function in java?
How to calculate complementary error function in java ?…
-
1
votes1
answer108
viewsQ: Nomethoderror in Usuario#new Rubyonrails
controller: class UsuarioController < ApplicationController def index @usuarios = Usuario.order :nome end def new @usuario = Usuario.new end def show @usuario = Usuario.find(params[:id]) end def…
-
0
votes2
answers1445
viewsA: Calling JQUERY function with Primefaces
I solved the problem with the following code: onclick="jQuery(PrimeFaces.escapeClientId('tabelaRaca')).hide()"
-
0
votes2
answers1445
viewsQ: Calling JQUERY function with Primefaces
I want to run a Jquery call after the click of a button: <p:commandButton id="btnSelecionaLote" icon="ui-icon-pencil" action="#{loteController.selecionarLote()}">…
-
1
votes1
answer74
viewsQ: What is the name of this component below?
Have some component ready with primefaces do what the image illustrates below? I need to do this with JSF and I’m half lost. The idea is that yes is an auto complete, but if he does not find…
-
0
votes2
answers685
viewsA: Jquery how to set a value in a field with CPF Mask?
The solution I found was to add the property data-mask="000.000.000-00" masking in HTML itself: <input class="form-control" id="cpfDependente" name="cpfDependente" type="text"…
-
1
votes2
answers685
viewsQ: Jquery how to set a value in a field with CPF Mask?
I have an input using an example CPF mask : $("#cpfDependente").mask('000.000.000-00'); and I’m trying to set a value in the input this way $("#cpfDependente").val(dependente.cpf); It correctly…
-
2
votes1
answer717
viewsQ: Error 403 Forbidden while consuming CEP webservice
I’m trying to consume a webservice of ceps but always returns me 403 and it is public. Testing the Working Webservice : http://apps.widenet.com.br/busca-cep/api/cep.json?code=01001000 My Controller…
-
6
votes2
answers4267
viewsQ: Assign a value to my td inside a table with jQuery
I cannot assign a value to my td within a table, it contains id dynamic as in the example below: <table class="table table-condensed table-hover" id="tabelaDependentes"> <caption>Lista…
-
2
votes1
answer5362
viewsQ: What is the purpose of the @Transactional(readonly = false) annotation?
Annotation used for service injection in the Spring Framework.
-
0
votes3
answers60
viewsQ: Javascript does not follow the algorithm flow
Example : $("#segundaFeira").change(function(){ valorSegundaFeira = calcularJornadaDeTrabalho(this.value); var x = valorFinalJornadaTrabalho(); alert(x); }); Note that the global variable…
-
3
votes1
answer273
viewsQ: Mouseover effect td with jquery or css
How to do for when I pass the mouse on top of mine td, show the edit icon on it? Note: My code does not work: jQuery Event: $(".editableSpan").mouseover(function(){ $("#tdEditable").append("<span…
-
1
votes0
answers69
viewsQ: How does mock work in integration testing?
How to use mock in my integration tests?
-
1
votes2
answers402
viewsQ: Redirect JSF error
I am trying to pass two parameters to another example page: <p:commandButton icon="ui-icon-pencil" action="form?faces-redirect=true&id=cargo.id"></p:commandButton> But this error…
-
1
votes1
answer4739
viewsQ: orphanRemoval JPA
How orphanRemoval works? Why when I put it on a list does not work ex: @OneToMany(mappedBy = "simulationMedia", cascade = CascadeType.ALL, orphanRemoval = true) @JsonIgnore private…
-
5
votes2
answers18970
viewsQ: How does Hibernate.hbm2ddl.auto work?
What values can I use on this property? ex: Update <prop key="hibernate.hbm2ddl.auto">update</prop> How does it work? When should I use? is good practice?…
-
1
votes1
answer7968
viewsQ: java.lang.Classnotfoundexception: javax.faces.webapp.Facesservlet
Trying to start my JSF application returns this error : java.lang.ClassNotFoundException: javax.faces.webapp.FacesServlet pom.xml <dependency> <groupId>com.sun.faces</groupId>…
-
0
votes1
answer608
viewsQ: Bootsfaces Error javax.faces.Facesexception: Expression error
Follow the error javax.faces.FacesException: Erro de expressão: Objeto denominado: net.bootsfaces.component.Button não encontrado. Pom <dependency>…
-
1
votes1
answer370
viewsQ: Error in creating a Maven project
As soon as I create a Maven project with the "War" Packaging, it gives the following error : Description Resource Path Location Type web.xml is missing and <failOnMissingWebXml> is set to true…
-
4
votes1
answer92
viewsQ: Is it possible to authenticate with Angularjs?
Is it possible to authenticate with Angular and recover the logged in user? If possible what best practice to do?
angularjsasked Jose Vieira Neto 2,560 -
1
votes1
answer43
viewsA: Angularjs Routerprovider configuration error
The problem was that the file serialGenerator.js was not being imported. <script src="src/main/webapp/app-content/js/serialGenerator.js"></script>…
-
2
votes1
answer43
viewsQ: Angularjs Routerprovider configuration error
I imported the angular-route.js and made the following configuration : <script type="text/javascript"> angular.module("layoutxepa",["ngRoute"]); angular.module("layoutxepa").config(function…