11package love.forte.simbot.codegen.codegen.naming
22
33import love.forte.codegentle.common.naming.ClassName
4+ import love.forte.codegentle.common.naming.parseToPackageName
5+ import love.forte.codegentle.common.naming.plus
46
57// TODO
8+ @Suppress(" unused" )
69object SpringNames {
7- private val componentAno = ClassName (" org.springframework.stereotype" , " Component" )
10+ // val springPkg = "org.springframework".parseToPackageName()
11+ val springStereotypePkg = " org.springframework.stereotype" .parseToPackageName()
12+ val springBindPkg = " org.springframework.web.bind.annotation" .parseToPackageName()
13+ val springContextPkg = " org.springframework.context.annotation" .parseToPackageName()
14+ val springBeanPkg = " org.springframework.beans.factory.annotation" .parseToPackageName()
15+ val springBootPkg = " org.springframework.boot" .parseToPackageName()
16+
17+ val componentAno = ClassName (springStereotypePkg, " Component" )
18+ val serviceAno = ClassName (springStereotypePkg, " Service" )
19+ val repositoryAno = ClassName (springStereotypePkg, " Repository" )
20+ val controllerAno = ClassName (springBindPkg, " Controller" )
21+ val restControllerAno = ClassName (springBindPkg, " RestController" )
22+ val configurationAno = ClassName (springContextPkg, " Configuration" )
23+ val autoWiredAno = ClassName (springBeanPkg, " Autowired" )
24+ val qualifierAno = ClassName (springBeanPkg, " Qualifier" )
25+ val valueAno = ClassName (springBeanPkg, " Value" )
26+ val requestMappingAno = ClassName (springBindPkg, " RequestMapping" )
27+ val getMappingAno = ClassName (springBindPkg, " GetMapping" )
28+ val postMappingAno = ClassName (springBindPkg, " PostMapping" )
29+ val putMappingAno = ClassName (springBindPkg, " PutMapping" )
30+ val deleteMappingAno = ClassName (springBindPkg, " DeleteMapping" )
31+ val requestBodyAno = ClassName (springBindPkg, " RequestBody" )
32+ val pathVariableAno = ClassName (springBindPkg, " PathVariable" )
33+ val requestParamAno = ClassName (springBindPkg, " RequestParam" )
34+
35+ // Spring Boot annotations
36+ val springBootApplicationAno = ClassName (springBootPkg, " SpringBootApplication" )
37+ val enableAutoConfigurationAno = ClassName (springBootPkg, " EnableAutoConfiguration" )
38+ val conditionalOnMissingBeanAno = ClassName (springBootPkg + " autoconfigure.condition" , " ConditionalOnMissingBean" )
39+ val conditionalOnBeanAno = ClassName (springBootPkg + " autoconfigure.condition" , " ConditionalOnBean" )
40+ val conditionalOnPropertyAno = ClassName (springBootPkg + " autoconfigure.condition" , " ConditionalOnProperty" )
41+ val conditionalOnClassAno = ClassName (springBootPkg + " autoconfigure.condition" , " ConditionalOnClass" )
842}
0 commit comments