Skip to content
Advertisement

Tag: spring-boot

Error resolving fragment template Spring Boot using Thymeleaf

I have a Spring Boot application using Thymeleaf, it works fine when using mvn spring-boot:run but when deploying it into the JAR file it gives me an error for all files that have th:replace statement for example templates/web/index in line: <div th:replace=”/web/includes/header :: header”></div> The exception when trying to run java -jar my-app.jar My project resources hierarchy My resources locations

After trying to test connection to h2 database or connect whitelabel error occurs

After running Spring boot project and going to localhost:8080/h2-console and after trying to connect to my database I get whitelabel error when i click any button on h2-console screen. I am using in memory database. I am trying to connect to database with classic username:sa and password:(blank) Even after clicking Save i get whitelabel error application properties: pom xml: configure

I can’t generate the gRPC stubs classes

I managed to generate the classes through the .proto file but they are in the build. I would like the classes to be generated within the main because when I am going to extend the stub, it is not being possible to implement the methods. Look: File .proto: The .proto file is inside the main folder. Does anyone know how

Spring Boot App does not recognize environment variables in application.yml file

there. I’m new to Java Spring Boot and I’m trying to set environment variables in application.yml. I’ve added dotenv maven dependency: I’ve set variables in the .env file: And in my application.yml: While running application I’m getting jdbc error: java.lang.RuntimeException: Driver org.postgresql.Driver claims to not accept jdbcUrl, ${SPRING_DATABASE_URL} I’ve tried some solutions like: or in application.yml: or or Am I

Getters and setters for List in Spring boot

I am creating my API in Spring Boot. I have that a product is composed of components: Here is my code: (Entity Layer) } My Question: In the controller class should I change the update method to be as follows, to have the following code, product.addProduct(myComponent) or should I have it as follows: product.setProductComponents((Component) myProduct.getProductComponents()): or is there a better

Spark UDF function fail on Standalone Spark

I have spring boot java application myapp.jar with something udf function. SparkConfuration.java ToIntegerUdf.java sparkJars contains path to myJar.jar. Application build with Maven. Spark library version is 3.02 and scala version is 2.12.10. When I running application on Spark Standalone 3.0.2 I have an error: In spark worker log I see, worker fetch myJar: 21/03/23 19:33:24 INFO Executor: Fetching spark://demo.phoenixit.ru:39597/jars/myJar.jar with

HTML5 video skips ranges after 32,768

I am exploring Http Range requests and video streaming with Java. I wanted to create a controller which streams a video to a tag. For some reason, after end range of 32768, the browser sends request for start of 100237312. Here are a slice of the logs from my console: My code: The client: I would appreciate if someone explains

Advertisement