Skip to content

How to get user id with Spring MVC?

I using the POST method for add Item to the database with Spring MVC. But each Item has field userId, it FOREIGN KEY to users table. Need to know user’s id for this. I using Spring security for auth. May be there is a possibility get current user’s id with ServletContext or HttpSession, may be spr…

Query DSL Q type classes not generated

I am trying to use QueryDSL in my eclipse maven project. These are the dependencies. After this I try to write the queries. But I get the error Note: ReportingParamDAO is an entity class. This means that the Q type class for my DAO is not generated. I am not sure why it wasn’t generated. Do I need to do

Maven not found in Jenkins

I am running my Maven/Spring project in Jenkins (just testing it out, first time) using the shell script option with: mvn spring-boot:run I get the build error: /Users/Shared/Jenkins/tmp/jenkins8087926087546049217.sh: line 2: mvn: command not found How can I fix this? Its a Spring-boot app. It works fine when…