io.github.ro4.spelvalidation.TestConfiguration   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 18
rs 10
wmc 2

3 Methods

Rating   Name   Duplication   Size   Complexity  
A spELValidator() 0 3 1
A simpleService() 0 3 1
A SimpleService.isNameUnique(String) 0 2 1
1
package io.github.ro4.spelvalidation;
2
3
import org.springframework.context.annotation.Bean;
4
import org.springframework.context.annotation.Configuration;
5
import org.springframework.stereotype.Service;
6
7
@Configuration
8
public class TestConfiguration {
9
    @Bean
10
    public SimpleService simpleService() {
11
        return new SimpleService();
12
    }
13
14
    @Bean
15
    public SpELValidator spELValidator() {
16
        return new SpELValidator();
17
    }
18
19
20
    @Service
21
    @SuppressWarnings("unused")
22
    public static class SimpleService {
23
        public boolean isNameUnique(String name) {
24
            return "hello".equals(name);
25
        }
26
    }
27
}
28