File tree Expand file tree Collapse file tree 10 files changed +26
-6
lines changed
main/java/com/narayanatutorial
test/java/com/narayanatutorial/SpringBootProfileExample Expand file tree Collapse file tree 10 files changed +26
-6
lines changed Original file line number Diff line number Diff line change 1
- package com .narayanatutorial . SpringBootProfileExample ;
1
+ package com .narayanatutorial ;
2
2
3
3
import org .springframework .boot .SpringApplication ;
4
4
import org .springframework .boot .autoconfigure .SpringBootApplication ;
5
+
6
+ import com .narayanatutorial .service .VehicleBrand ;
7
+
5
8
import org .springframework .beans .factory .annotation .Autowired ;
6
9
import org .springframework .boot .CommandLineRunner ;
7
10
Original file line number Diff line number Diff line change 1
- package com .narayanatutorial .SpringBootProfileExample ;
1
+ package com .narayanatutorial .service ;
2
2
3
3
public interface VehicleBrand {
4
4
Original file line number Diff line number Diff line change 1
- package com .narayanatutorial .SpringBootProfileExample ;
1
+ package com .narayanatutorial .serviceImpl ;
2
2
3
3
import org .springframework .context .annotation .Profile ;
4
4
import org .springframework .stereotype .Service ;
5
5
6
+ import com .narayanatutorial .service .VehicleBrand ;
7
+
6
8
@ Service
7
9
@ Profile ("Honda" )
8
10
public class Honda implements VehicleBrand {
Original file line number Diff line number Diff line change 1
- package com .narayanatutorial .SpringBootProfileExample ;
1
+ package com .narayanatutorial .serviceImpl ;
2
2
3
3
import org .springframework .context .annotation .Profile ;
4
4
import org .springframework .stereotype .Service ;
5
5
6
+ import com .narayanatutorial .service .VehicleBrand ;
7
+
6
8
7
9
@ Service
8
10
@ Profile ("Hundai" )
Original file line number Diff line number Diff line change 1
- package com .narayanatutorial .SpringBootProfileExample ;
1
+ package com .narayanatutorial .serviceImpl ;
2
2
3
3
import org .springframework .context .annotation .Profile ;
4
4
import org .springframework .stereotype .Service ;
5
5
6
+ import com .narayanatutorial .service .VehicleBrand ;
7
+
6
8
7
9
@ Service
8
10
@ Profile ("MarutiSuziki" )
Original file line number Diff line number Diff line change 1
- package com .narayanatutorial .SpringBootProfileExample ;
1
+ package com .narayanatutorial .serviceImpl ;
2
2
3
3
import org .springframework .context .annotation .Profile ;
4
4
import org .springframework .stereotype .Service ;
5
5
6
+ import com .narayanatutorial .service .VehicleBrand ;
7
+
6
8
7
9
@ Service
8
10
@ Profile ("Tata" )
Original file line number Diff line number Diff line change 10
10
import org .springframework .test .context .ActiveProfiles ;
11
11
import org .springframework .test .context .junit4 .SpringRunner ;
12
12
13
+ import com .narayanatutorial .service .VehicleBrand ;
14
+
13
15
14
16
@ RunWith (SpringRunner .class )
15
17
@ SpringBootTest
Original file line number Diff line number Diff line change 9
9
import org .springframework .test .context .ActiveProfiles ;
10
10
import org .springframework .test .context .junit4 .SpringRunner ;
11
11
12
+ import com .narayanatutorial .service .VehicleBrand ;
13
+
12
14
@ RunWith (SpringRunner .class )
13
15
@ SpringBootTest
14
16
@ ActiveProfiles ("Hundai" )
Original file line number Diff line number Diff line change 7
7
import org .springframework .boot .test .context .SpringBootTest ;
8
8
import org .springframework .test .context .ActiveProfiles ;
9
9
import org .springframework .test .context .junit4 .SpringRunner ;
10
+
11
+ import com .narayanatutorial .service .VehicleBrand ;
12
+
10
13
import org .junit .Test ;
11
14
12
15
@ RunWith (SpringRunner .class )
Original file line number Diff line number Diff line change 9
9
import org .springframework .test .context .ActiveProfiles ;
10
10
import org .springframework .test .context .junit4 .SpringRunner ;
11
11
12
+ import com .narayanatutorial .service .VehicleBrand ;
13
+
12
14
13
15
@ RunWith (SpringRunner .class )
14
16
@ SpringBootTest
You can’t perform that action at this time.
0 commit comments