Comments (3)
Spring Boot itself doesn't do anything with querydsl-jpa
and it isn't a dependency in Spring Boot's build. Spring Data JPA does depend on querydsl-jpa
but it's already using the jakarta
classifier:
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
<classifier>jakarta</classifier>
<version>${querydsl}</version>
<optional>true</optional>
</dependency>
Can you please describe the problem that you faced in some more detail? Right now, I don't think we have enough information to identify what should be changed or where that change needs to happen.
from spring-boot.
Wow that was a quick reply.
I was trying to import querydsl directly in my gradle project.
We use spring boot autoconfigure in our project (so that we dont have to manage versions, wonders of spring boot yeah).
The following import does not get you the jakarta version of the dependencies.
implementation("com.querydsl:querydsl-core")
implementation("com.querydsl:querydsl-jpa")
annotationProcessor("com.querydsl:querydsl-apt")
Additionally, I was also referring to this dependency versions doc which doesnt mention the jakarta release of the thing. Might be a miss?
https://docs.spring.io/spring-boot/docs/3.2.4/reference/html/dependency-versions.html#appendix.dependency-versions.properties
There was also a bug from someone who ended up hinting me at what was wrong https://stackoverflow.com/questions/74756871/spring-boot-3-with-querydsl
Anyway, my issue is solved but i would like to just add this in somewhere so that someone else doesn't face the same struggles
from spring-boot.
We use spring boot autoconfigure in our project (so that we dont have to manage versions, wonders of spring boot yeah).
It's not Spring Boot's auto-configuration that allows you to omit the versions, it's Spring Boot's dependency management. In the case of your sample project, it's being applied through dependency management plugin but you'd see the same behaviour if you used Gradle's platform support.
implementation("com.querydsl:querydsl-jpa")
It's to be expected that this does not get you the Jakarta version as you have told Gradle that you want the standard non-classified variant. You'd see the same behaviour with Maven if you declared the dependency without a classifier.
Whether you're using the dependency management plugin or Gradle's platform support, you need to specify the classifier when declaring the dependency. The answers on Stack Overflow touch on this, but they're all more verbose than needed. You can use this syntax to declare a classifier while allowing the version to be controlled separately:
implementation("com.querydsl:querydsl-jpa::jakarta")
Note the ::
which omits the version, allowing it to be provided by either the dependency management plugin or a platform dependency. This capability is described in Gradle's documentation where it notes that "all properties, except name, are optional".
I was also referring to this dependency versions doc which doesnt mention the jakarta release of the thing
We wanted to include the classifier information in the documentation but, unfortunately, it wasn't possible to do so in a way that would be scalable and maintainable for the number of dependencies that Boot manages.
Given that Spring Boot itself doesn't do anything with querydsl-jpa, there isn't really a natural place in the documentation to mention the need for the classifier. I think it would be better to document it in Spring Data JPA's documentation where there's an existing section on QueryDSL. If you would like to see that happen, please open a Spring Data JPA issue.
from spring-boot.
Related Issues (20)
- Fix documentation links in the README
- Fix documentation links in the README
- Add support for CNB platform API version 0.14
- Constructor binding of EnumMap fails due to missing key type HOT 2
- DynamicPropertyRegistry Values Not Set After Dev Tools Reload for RestartScope Containers
- Upgrade to Spring RESTDocs 3.0.2
- Upgrade to Spring Framework 6.2.0-M6
- Spring Boot 2 datasource can not run with Dockerfile HOT 4
- ClassNotFoundException in JSP compiler after update from Spring Boot 3.3.1 -> 3.3.2 HOT 6
- Broken documentation links HOT 2
- java.lang.LinkageError: loader 'app' attempted duplicate class definition for jakarta.persistence.TemporalType HOT 1
- Has the loading order of springboot3 beans changed? HOT 1
- Wait until spring-boot.rb file is available when updating Homebrew tap
- Spring Boot profiles not respected when fetching configuration files from Spring Cloud Config after native build HOT 7
- Constructor binding of EnumMap fails due to missing key type
- Constructor binding of EnumMap fails due to missing key type
- Use Spring SSL bundle in SAML2 signing
- RestClient.Builder vs RestClientAutoConfiguration's Implementation HOT 2
- Documentation that describes the effect upon Actuator of defining your own SecurityFilterChain is inaccurate HOT 1
- Disable automatic creation of observation on some scheduled tasks HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spring-boot.