Skip to content
Advertisement

Tag: spring-boot

Detached entity passed to persist java spring

So i have a big error when trying to do an update method in my spring application ,the problem is regarding to the Caracter class as thats the one the seems to generate it. When i set my stuff in main and try to update an Anime object in the database the Caracter class gives me the errors presented below

Connecting multiple databases

I would like to connect my application with 2 different databases. This is what I have tried: And so in application.properties I have added: But Intellij tells me: Cannot resolve configuration property ‘spring.wald.datasource.url’ What am I doing wrong? Answer Instead of returning DataSource, you could return DataSourceProperties, like: Also, the dependency spring-boot-configuration-processor will be required. Important: After that’s done, you

Google Cloud Debugger can’t find Spring Boot web app deployed as Cloud Run service

I followed the guide (https://cloud.google.com/debugger/docs/setup/java#cloud-run) to setup the cloud debugger for my cloud run services. Everything looks like it should work. However the debugger UI tells me it can not find any application. However I did everything that was suugested in the documentation Source code is in Source Repositories Cloud Build triggers on master push I download the cdbg-java-agent.so I

Spring Boot URL mapping not working when files are present in multiple packages

I tried making a simple REST API using Spring Boot. I have put the classes in separate packages. In this case, the URL mapping is not working (checked using Postman), whereas its working fine if I put them all in the same package as that of the main class. “”” Hierarchy of the packages : com.example.ProductCRUD |—–ProductCrudApplication.java (main) com.example.ProductCRUD.Controller |—–ProductController.java(controller)

Spring Boot 2 datasource by configuration does not work

I have an application.yml(!) for the configuration containing the following: Which gives me the errormessage: Doing it this way works: Ideas? 🙂 Answer Rename driverClassName to driver-class-name since Kebab case is preferred over Camel case in Spring Boot Auto Configuration properties. If that doesn’t help then make sure that you didn’t turn off DataSourceAutoConfiguration feature. It usually may look like

Looking for a template engine which supports JsonPath (Java)

I’m developing a microservice (let’s call it email microservice) which generates emails from HTML templates. Basically, the client sends a json with some data to the email microservice, and based on that data it has to generate an email (populate fields in html template with values coming in the json). The client is our other microservice, which prepares json and

Implement Search specification for pagination

I implemented this Page request: The question is how to implement search functionality for this Page request? I would like to send params like type and dateAdded into GET params and return filtered result? Answer There are two ways to achieve this: Examples. Simple but can only be used for simple searches To be able to search by example, you

Advertisement