小编Sha*_*aun的帖子

EnableTransactionManagement 无法解析为类型

package com.shaun.spring.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan("com.shaun.spring")
@EnableTransactionManagement
public class ApplicationContextConfig {

    // @Bean configurations go here...

}
Run Code Online (Sandbox Code Playgroud)

我对@EnableTransactionManagement 有问题,发生的以下错误是:EnableTransactionManagement 无法解析为类型。

我的 pom.xml 中有以下依赖项:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-tx</artifactId>
    <version>4.1.6.RELEASE</version>
</dependency>
Run Code Online (Sandbox Code Playgroud)

我也尝试过使用以下导入:

import org.springframework.transaction.annotation.EnableTransactionManagement;
Run Code Online (Sandbox Code Playgroud)

这给了我以下错误:

The import org.springframework.transaction.annotation.EnableTransactionManagement cannot be resolved
Run Code Online (Sandbox Code Playgroud)

java pom.xml maven

2
推荐指数
1
解决办法
7713
查看次数

检查Enum是空还是空

我正在尝试验证正在发送到我的控制器的json,并且我正在使用BindingResult方式,我能够正常验证字符串和其他所有内容.但我不知道如何检查枚举是空还是空.

java validation enums isnull

1
推荐指数
2
解决办法
2万
查看次数

标签 统计

java ×2

enums ×1

isnull ×1

maven ×1

pom.xml ×1

validation ×1