I have two entities Book and BookTag. They are connect by many to many relationship. I try to add to the set of bookTags new BookTag entity using such service method But it doesn’t work, after I saved an entity into the mysql database it work correctly view of books_tags table after inserting a new tag to the book After
Tag: spring
Apache Wicket with Spring version dependencies
Is there any known version dependencies between Apache Wicket and Spring? Couldn’t find any from the Wicket or Wicket-Spring bridge documentation . For example can Wicket 7 be run with Spring 5, Wicket 9 with Spring 4 and so on. Answer Wicket 7.x uses Spring 4.1.x – https://github.com/apache/wicket/blob/wicket-7.x/pom.xml#L135 Wicket 8.x uses Spring 4.3.x – https://github.com/apache/wicket/blob/wicket-8.x/pom.xml#L137 Wicket 9.x uses Spring 5.3.x
Use H2 as test DB in JUnit5
I’m developing an app in Spring Boot. I use a PostreSQL DB for production, and I want my JUnit 5 tests to run on a H2 memory DB. Problem is, after some configuration, the tests still don’t seem to run on the in-memory db: I can access entities from the prod db (a saved entity doesn’t persist in the prod
Is there such a query for mongodb?
I need to do a query on mongoDB due to I am developing in Java with Spring Boot and MongoDB. I know that this command is for arrays: This query let me to find if all fields of the arraylist “skillsOfCV” are in the arraylist called “skills” However, I am trying to pass an arraylist as “skillsOfCV” to compare all
Spring Boot: Cannot load configuration class
I am currently creating my first Spring Boot application. Unfortunately, I get an error right at the beginning that I can’t understand. POM Only some rudimentary dependencies are defined here. Java 8 and Spring Boot 2.0.1 are to be used. App Here the application is defined as a SpringBoot application. The autoconfig should actually make everything work automatically. Console output
Field … in … a bean of type ‘service’ that could not be found
I’m trying to use an object which is in an external library, but when I use the @Autowired property, it is not found by the application. The main application has the following annotations: In the com.XXXX.prj.business.modules I have a class that calls the object of the dependency, called MailService, in this way: Here is the problem, this mailService object is
Spring suddenly has cyclic dependencies after switching to new version
A maven project has spring-boot-starter-parent as its parent. I just switched the version from 2.3.1.RELEASE to 2.6.7. Suddenly, the springboot application that uses this project has cyclic dependencies with this error: The dependencies of some of the beans in the application context form a cycle: org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration ┌─────┐ | com.mycompany.spring.logging.configuration.InterceptorConfiguration (field com.mycompany.spring.logging.RequestInterceptor com.mycompany.spring.logging.configuration.InterceptorConfiguration.interceptor) └─────┘ Action: Relying upon circular references is discouraged
How to save array of object in sprig boot with crudrepository?
I am very new to Spring boot and this is my first spring dummy project where I’m trying to learn to save an array of objects in mysql-db. Actually, I am trying to use the saveAll method from the crudRepository in my controller. But it’s giving me an error no instance(s) of type variable(s) S exist so that Iterable<S> conforms
IntelliJ Run Configuration for Spring Boot apps?
I do not change run configuration unless reinstalling IntelliJ IDEA and I am not sure if I set the run config properly. Configuration Dialog Could you pls clarify me about the following issue based on the attached dialog: 1. SHould I use SPring Boot or Application Template of Run config for a Spring Boot app? Or is both of them
GraphQL Scalar for java.time.LocalDate parses dates as StringValue
I try to parse a date, e.g. “2022-02-02” as java.time.LocalDate. Why the values passed to the scalar class are wrapped into curly braces? And how do I fix this? I configured the scalar for java.time.LocalDate: This is the query: The error says that Text ‘StringValue{value=’2018-09-03′}’ could not be parsed at index 0. I do not really understand why this is