Relative Content

Tag Archive for spring-boot

springboot fragment for specific div section

I am building a programme in springboot I just started learning it.
I was able to include a whole title section into the base html but I have been looking for a way to include a specific div section in springboot.
I have googled if there is any way I can do that but I have not been able to find anything tangible

Why are transactions still valid for method calls of the same class?

I’ve been reading a lot of related questions on the internet, and they all say that there are no transactions for submethods for method calls of the same class. So after the following code is executed, there should be method2 in the database and no method1. but actually none of them are saved to the database.

Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.7.1:descriptor failed: Unsupported class file major version 66

enter image description here
i have added this in my pom.xml to build the custom maven plugin ,The error “Unsupported class file major version 66” indicates that you are trying to compile or execute code that was compiled with a Java version higher than the one currently configured in your environment.major version 66 corresponds to Java 16 bytecode, which is not compatible with your current Java 17 setup.
Execution default-descriptor of goal org.apache.maven.plugins:maven-plugin-plugin:3.7.1:descriptor failed: Unsupported class file major version 66.

How to resolve the issue of Spring Boot not being able to find a class?

I clearly have a class SubjectCategoryDTOConvert in the directory com.jingdianjichi.subject.application.controller.convert, which I wrote as an interceptor, but it is still throwing an error.
enter image description here
Enter image description here My project structure is as follows: Enter image description here
When I sent this POST request, it was like this: Enter image description here The POST request returned a 500 status code and did not insert data into my database.
enter image description here
I checked my Maven configuration, and I have included the dependency for this class, but it still shows that it cannot be found. What could be the issue and how can I resolve it?
enter image description here

springboot app launched on different port

I have a springboot application and I have defined several application properties files for different profiles. One of the profile ‘localtest’ has configurations defined in application-localtest.properties.