-
Annotation invalidation of dao interface using mybatis @ CacheNamespace cache
use mybatis to configure custom secondary cache. Using xml annotation can use < cache type= "com.test.dao.MybatisRedisCache " > to successfully use custom cache, but using @ CacheNamespace (implementation = MybatisRedisCache.class) on the dao i...
-
How does spring security loginPage become dynamic?
by default loginPage is login
No matter what url path you enter, it will automatically jump to the login page
for example, typing: localhost:9090 login 123 in the URL column of the browser will automatically jump to localhost:9090 login, becau...
-
When springboot adds support for fastjson, it returns not json but string. How to solve it?
@Bean
public HttpMessageConverters fastJsonHttpMessageConverters() {
1convert
FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
2fastjsonjson;
FastJsonConfig fastJsonConfig = new Fast...
-
Spring is downloaded through maven. How is the pom file written?
novice to java,
see that part of the pom of a project looks like this:
<dependency>
<groupId>org.springframework< groupId>
<artifactId>spring-web< artifactId>
<version>${springframework.version}< ver...
-
Springboot project, the backend stores pictures to a directory of the project, how to write the path?
1.springboot project structure is shown in the figure
2.UploadControllerimages "templates images ", ". main resources templates images " url:
...
-
Maven project startup run error: null pointer exception
start the service center first, and then start the web project. This error will appear on the figure:
:
...
-
The springboot project uses @ RestController annotations. Is there a potential problem if the VO class does not implement the Serializable interface?
and input parameters use @ RequestBody annotations ...
-
Springboot has questions about the content of an article.
original https: www.cnblogs.com rensh.
when data is returned
I have tried my code for N times and all returned { "code ": 1, "msg ": "this id must be passed ", "data ": data }
cannot be returned at all unless it is returned directly, but t...
-
Tomcat 404 java spring mvc
web.xml
<servlet>
<servlet-name>mvc-dispatcher< servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet< servlet-class>
<load-on-startup>1< load-on-startup>
...
-
Springcloud ribbon implements the load, but it has not been successful. I would like to know under the guidance of people.
I tried to achieve the load through ribbon , but failed all the time
github Code address
in addition, my provider reports an error when it turns on a health check, and I don t know why
...
-
How does the CAS 4.X.X client loop redirect find the cause and the solution?
< H1 > problem description < H1 >
CAS Server (supports https) there are client1 , client2 , client3 multiple applications, among which client1 and client2 can normally support single sign-on, but client3 is not. The problem is that when CAS ...
-
What has been done behind < mvc:annotation-driven/ >
Spring,xml,@Controller,@Autowired,
@RequestMapping,@Service;
,xml:
<context:component-scan base-package="..." >
:
<mvc:annotation-driven >
??
...
-
scan the @ RequestMapping annotation?">Will < context:component-scan base-package= "" / > scan the @ RequestMapping annotation?
,,Spring mvc:
<context:component-scan base-package="..." >
@Controller,@RequestMapping.
,<context:component-scan base-package="" >Spring,
Spring mvc,? ...
-
Problems encountered in learning springboot + thymeleaf
the project always reports an error when calling the interface: org.thymeleaf.exceptions.TemplateInputException: Error resolving template " thymeleaf user ", template might not exist or might not be accessible by any of the configured Template Resolve...
-
Springmvc refers to the jar package. It can't be found, but there's no problem with startup.
spring-web @ RequestBody can t find for example, I can t find this jar package, but there s nothing wrong with the test interface after I start it. What s wrong with this package ?...
-
Shiro cannot clear authentication information using clearCachedAuthenticationInfo
use this.clearCachedAuthenticationInfo () to pass in tokens, and also execute this.clearCachedAuthorizationInfo () operation to empty the authorization information. The above two operations are the same principals . In Debug, it is found that the r...
-
Why does spring cloud feign execute the method in fallback directly after starting the circuit breaker?
< H2 > problem description < H2 >
in the process of using feign, turn on the circuit breaker by configuring feign.hystrix.enabled=true . However, the fallback will be executed directly after startup and will not determine whether the call was success...
-
How Zuul is request setAttribute within pre Filter
I hope to be able to perform setAttribute ( "key ", value) operation on request in filter of zuul, and then the downstream service can obtain data through request.getAttribute ( "key "); but the result does not happen as expected. Adding attribute to re...
-
How to efficiently query `findAll () `with spring-data-mongodb?
question
In business, all tables in the database need to be queried and statistically analyzed and shown in the echats figure. The previous data is fine when the data is small, and the cache can barely support the column .
now there is nearly 1 mi...
-
Spring @ Scheduled scheduled tasks. What if the tasks are too long and lead to overlap?
for example, the fixedRate of a scheduled task is 5 seconds, but sometimes the task executes for more than 5 seconds. What about the next execution of the task?
or cron starts to do a task in 5 seconds per minute, but if the task takes more than 1 min...