0.9.0 更新GAEA引用并删除由此造成的无用代码
This commit is contained in:
@@ -21,8 +21,8 @@ allprojects {
|
|||||||
|
|
||||||
subprojects {
|
subprojects {
|
||||||
ext {
|
ext {
|
||||||
version '0.7.1'
|
version '0.9.0'
|
||||||
gaea_version = '1.1.0'
|
gaea_version = '1.2.0'
|
||||||
spring_version = "2.7.0"
|
spring_version = "2.7.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,15 +1,37 @@
|
|||||||
package com.synebula.zeus.app.config
|
package com.synebula.zeus.app.config
|
||||||
|
|
||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
|
import com.synebula.gaea.app.component.security.WebSecurity
|
||||||
import com.synebula.gaea.data.serialization.json.IJsonSerializer
|
import com.synebula.gaea.data.serialization.json.IJsonSerializer
|
||||||
|
import com.synebula.gaea.domain.repository.IRepositoryFactory
|
||||||
|
import com.synebula.gaea.mongodb.query.MongodbQueryFactory
|
||||||
|
import com.synebula.gaea.mongodb.repository.MongodbRepositoryFactory
|
||||||
|
import com.synebula.gaea.query.IQueryFactory
|
||||||
import org.springframework.context.annotation.Bean
|
import org.springframework.context.annotation.Bean
|
||||||
import org.springframework.context.annotation.ComponentScan
|
import org.springframework.context.annotation.ComponentScan
|
||||||
|
import org.springframework.context.annotation.ComponentScan.Filter
|
||||||
import org.springframework.context.annotation.Configuration
|
import org.springframework.context.annotation.Configuration
|
||||||
|
import org.springframework.context.annotation.FilterType
|
||||||
|
import org.springframework.data.mongodb.core.MongoTemplate
|
||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan(basePackages = ["com.synebula.gaea.app.component"])
|
@ComponentScan(
|
||||||
|
basePackages = ["com.synebula.gaea.app.component"],
|
||||||
|
excludeFilters = [Filter(type = FilterType.ASSIGNABLE_TYPE, classes = [WebSecurity::class])]
|
||||||
|
)
|
||||||
class ZeusBeans {
|
class ZeusBeans {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
fun repoFactory(template: MongoTemplate): IRepositoryFactory {
|
||||||
|
return MongodbRepositoryFactory(template)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
fun queryFactory(template: MongoTemplate): IQueryFactory {
|
||||||
|
return MongodbQueryFactory(template)
|
||||||
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
fun gson(): Gson = Gson()
|
fun gson(): Gson = Gson()
|
||||||
|
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ package com.synebula.zeus.app.controller.rbac
|
|||||||
|
|
||||||
import com.synebula.gaea.app.Application
|
import com.synebula.gaea.app.Application
|
||||||
import com.synebula.gaea.log.ILogger
|
import com.synebula.gaea.log.ILogger
|
||||||
|
import com.synebula.gaea.query.IQueryFactory
|
||||||
import com.synebula.zeus.domain.service.cmd.rbac.GroupCmd
|
import com.synebula.zeus.domain.service.cmd.rbac.GroupCmd
|
||||||
import com.synebula.zeus.domain.service.contr.rbac.IGroupService
|
import com.synebula.zeus.domain.service.contr.rbac.IGroupService
|
||||||
import com.synebula.zeus.query.contr.IGroupQuery
|
|
||||||
import com.synebula.zeus.query.view.GroupView
|
import com.synebula.zeus.query.view.GroupView
|
||||||
import org.springframework.web.bind.annotation.RequestMapping
|
import org.springframework.web.bind.annotation.RequestMapping
|
||||||
import org.springframework.web.bind.annotation.RestController
|
import org.springframework.web.bind.annotation.RestController
|
||||||
@@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RestController
|
|||||||
@RequestMapping("/groups")
|
@RequestMapping("/groups")
|
||||||
class GroupApp(
|
class GroupApp(
|
||||||
service: IGroupService,
|
service: IGroupService,
|
||||||
query: IGroupQuery,
|
factory: IQueryFactory,
|
||||||
logger: ILogger
|
logger: ILogger
|
||||||
) : Application<GroupCmd, GroupView, String>(
|
) : Application<GroupCmd, GroupView, String>(
|
||||||
"分组信息", service, query, logger
|
"分组信息", service, factory.createQuery(GroupView::class.java), logger
|
||||||
)
|
)
|
||||||
@@ -2,9 +2,9 @@ package com.synebula.zeus.app.controller.rbac
|
|||||||
|
|
||||||
import com.synebula.gaea.app.Application
|
import com.synebula.gaea.app.Application
|
||||||
import com.synebula.gaea.log.ILogger
|
import com.synebula.gaea.log.ILogger
|
||||||
|
import com.synebula.gaea.query.IQueryFactory
|
||||||
import com.synebula.zeus.domain.service.cmd.rbac.RoleCmd
|
import com.synebula.zeus.domain.service.cmd.rbac.RoleCmd
|
||||||
import com.synebula.zeus.domain.service.contr.rbac.IRoleService
|
import com.synebula.zeus.domain.service.contr.rbac.IRoleService
|
||||||
import com.synebula.zeus.query.contr.IRoleQuery
|
|
||||||
import com.synebula.zeus.query.view.RoleView
|
import com.synebula.zeus.query.view.RoleView
|
||||||
import org.springframework.web.bind.annotation.RequestMapping
|
import org.springframework.web.bind.annotation.RequestMapping
|
||||||
import org.springframework.web.bind.annotation.RestController
|
import org.springframework.web.bind.annotation.RestController
|
||||||
@@ -13,8 +13,8 @@ import org.springframework.web.bind.annotation.RestController
|
|||||||
@RequestMapping("/roles")
|
@RequestMapping("/roles")
|
||||||
class RoleApp(
|
class RoleApp(
|
||||||
service: IRoleService,
|
service: IRoleService,
|
||||||
query: IRoleQuery,
|
factory: IQueryFactory,
|
||||||
logger: ILogger
|
logger: ILogger
|
||||||
) : Application<RoleCmd, RoleView, String>(
|
) : Application<RoleCmd, RoleView, String>(
|
||||||
"用户信息", service, query, logger
|
"用户信息", service, factory.createQuery(RoleView::class.java), logger
|
||||||
)
|
)
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.synebula.zeus.domain.repository.rbac
|
|
||||||
|
|
||||||
import com.synebula.gaea.domain.repository.IRepository
|
|
||||||
import com.synebula.zeus.domain.model.rbac.Group
|
|
||||||
|
|
||||||
interface IGroupRepository : IRepository<Group, String> {
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.synebula.zeus.domain.repository.rbac
|
|
||||||
|
|
||||||
import com.synebula.gaea.domain.repository.IRepository
|
|
||||||
import com.synebula.zeus.domain.model.rbac.Role
|
|
||||||
|
|
||||||
interface IRoleRepository : IRepository<Role, String> {
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.synebula.zeus.domain.repository.rbac.resource
|
|
||||||
|
|
||||||
import com.synebula.gaea.domain.repository.IRepository
|
|
||||||
import com.synebula.zeus.domain.model.rbac.resource.Interface
|
|
||||||
|
|
||||||
interface IInterfaceRepository : IRepository<Interface, String> {
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.synebula.zeus.domain.repository.rbac.resource
|
|
||||||
|
|
||||||
import com.synebula.gaea.domain.repository.IRepository
|
|
||||||
import com.synebula.zeus.domain.model.rbac.resource.Page
|
|
||||||
|
|
||||||
interface IPageRepository : IRepository<Page, String> {
|
|
||||||
}
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package com.synebula.zeus.domain.repository.rbac.resource
|
|
||||||
|
|
||||||
import com.synebula.gaea.domain.repository.IRepository
|
|
||||||
import com.synebula.zeus.domain.model.rbac.resource.System
|
|
||||||
|
|
||||||
interface ISystemRepository : IRepository<System, String> {
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.synebula.zeus.domain.service.contr.rbac
|
package com.synebula.zeus.domain.service.contr.rbac
|
||||||
|
|
||||||
import com.synebula.gaea.domain.service.IService
|
import com.synebula.gaea.domain.service.IService
|
||||||
import com.synebula.zeus.domain.model.rbac.Authority
|
|
||||||
import com.synebula.zeus.domain.service.cmd.rbac.AuthorityBatchAddCmd
|
import com.synebula.zeus.domain.service.cmd.rbac.AuthorityBatchAddCmd
|
||||||
import com.synebula.zeus.env.ResourceType
|
import com.synebula.zeus.env.ResourceType
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.synebula.zeus.domain.service.contr.rbac
|
package com.synebula.zeus.domain.service.contr.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.Domain
|
||||||
import com.synebula.gaea.domain.service.IService
|
import com.synebula.gaea.domain.service.IService
|
||||||
import com.synebula.gaea.domain.service.ServiceDependency
|
|
||||||
import com.synebula.zeus.domain.model.rbac.Group
|
import com.synebula.zeus.domain.model.rbac.Group
|
||||||
import com.synebula.zeus.domain.repository.rbac.IGroupRepository
|
|
||||||
|
|
||||||
@ServiceDependency(clazz = Group::class, repo = IGroupRepository::class)
|
@Domain(clazz = Group::class)
|
||||||
interface IGroupService : IService<String>
|
interface IGroupService : IService<String>
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.synebula.zeus.domain.service.contr.rbac
|
package com.synebula.zeus.domain.service.contr.rbac
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.Domain
|
||||||
import com.synebula.gaea.domain.service.IService
|
import com.synebula.gaea.domain.service.IService
|
||||||
import com.synebula.gaea.domain.service.ServiceDependency
|
|
||||||
import com.synebula.zeus.domain.model.rbac.Role
|
import com.synebula.zeus.domain.model.rbac.Role
|
||||||
import com.synebula.zeus.domain.repository.rbac.IRoleRepository
|
|
||||||
|
|
||||||
@ServiceDependency(clazz = Role::class, repo = IRoleRepository::class)
|
@Domain(clazz = Role::class)
|
||||||
interface IRoleService : IService<String>
|
interface IRoleService : IService<String>
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.synebula.zeus.domain.service.contr.rbac.resource
|
package com.synebula.zeus.domain.service.contr.rbac.resource
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.Domain
|
||||||
import com.synebula.gaea.domain.service.IService
|
import com.synebula.gaea.domain.service.IService
|
||||||
import com.synebula.gaea.domain.service.ServiceDependency
|
|
||||||
import com.synebula.zeus.domain.model.rbac.resource.Interface
|
import com.synebula.zeus.domain.model.rbac.resource.Interface
|
||||||
import com.synebula.zeus.domain.repository.rbac.resource.IInterfaceRepository
|
|
||||||
|
|
||||||
@ServiceDependency(clazz = Interface::class, repo = IInterfaceRepository::class)
|
@Domain(clazz = Interface::class)
|
||||||
interface IInterfaceService : IService<String>
|
interface IInterfaceService : IService<String>
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.synebula.zeus.domain.service.contr.rbac.resource
|
package com.synebula.zeus.domain.service.contr.rbac.resource
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.Domain
|
||||||
import com.synebula.gaea.domain.service.IService
|
import com.synebula.gaea.domain.service.IService
|
||||||
import com.synebula.gaea.domain.service.ServiceDependency
|
|
||||||
import com.synebula.zeus.domain.model.rbac.resource.Page
|
import com.synebula.zeus.domain.model.rbac.resource.Page
|
||||||
import com.synebula.zeus.domain.repository.rbac.resource.IPageRepository
|
|
||||||
|
|
||||||
@ServiceDependency(clazz = Page::class, repo = IPageRepository::class)
|
@Domain(clazz = Page::class)
|
||||||
interface IPageService : IService<String>
|
interface IPageService : IService<String>
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
package com.synebula.zeus.domain.service.contr.rbac.resource
|
package com.synebula.zeus.domain.service.contr.rbac.resource
|
||||||
|
|
||||||
|
import com.synebula.gaea.domain.service.Domain
|
||||||
import com.synebula.gaea.domain.service.IService
|
import com.synebula.gaea.domain.service.IService
|
||||||
import com.synebula.gaea.domain.service.ServiceDependency
|
|
||||||
import com.synebula.zeus.domain.model.rbac.resource.System
|
import com.synebula.zeus.domain.model.rbac.resource.System
|
||||||
import com.synebula.zeus.domain.repository.rbac.resource.ISystemRepository
|
|
||||||
|
|
||||||
@ServiceDependency(clazz = System::class, repo = ISystemRepository::class)
|
@Domain(clazz = System::class)
|
||||||
interface ISystemService : IService<String>
|
interface ISystemService : IService<String>
|
||||||
@@ -3,22 +3,22 @@ package com.synebula.zeus.domain.service.impl.rbac
|
|||||||
import com.synebula.gaea.data.message.DataMessage
|
import com.synebula.gaea.data.message.DataMessage
|
||||||
import com.synebula.gaea.data.message.Status
|
import com.synebula.gaea.data.message.Status
|
||||||
import com.synebula.gaea.data.serialization.IObjectMapper
|
import com.synebula.gaea.data.serialization.IObjectMapper
|
||||||
|
import com.synebula.gaea.domain.repository.IRepositoryFactory
|
||||||
import com.synebula.gaea.domain.service.ICommand
|
import com.synebula.gaea.domain.service.ICommand
|
||||||
import com.synebula.gaea.domain.service.Service
|
import com.synebula.gaea.domain.service.Service
|
||||||
import com.synebula.gaea.ext.toMd5
|
import com.synebula.gaea.ext.toMd5
|
||||||
import com.synebula.gaea.log.ILogger
|
import com.synebula.gaea.log.ILogger
|
||||||
import com.synebula.zeus.domain.model.rbac.User
|
import com.synebula.zeus.domain.model.rbac.User
|
||||||
import com.synebula.zeus.domain.repository.rbac.IUserRepository
|
|
||||||
import com.synebula.zeus.domain.service.component.IUserNotifier
|
import com.synebula.zeus.domain.service.component.IUserNotifier
|
||||||
import com.synebula.zeus.domain.service.contr.rbac.IUserService
|
import com.synebula.zeus.domain.service.contr.rbac.IUserService
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
class UserService(
|
class UserService(
|
||||||
repository: IUserRepository,
|
factory: IRepositoryFactory,
|
||||||
mapper: IObjectMapper,
|
mapper: IObjectMapper,
|
||||||
var userNotifier: IUserNotifier?,
|
var userNotifier: IUserNotifier?,
|
||||||
var logger: ILogger
|
var logger: ILogger
|
||||||
) : Service<User, String>(User::class.java, repository, mapper), IUserService {
|
) : Service<User, String>(User::class.java, factory.createRepository(User::class.java), mapper), IUserService {
|
||||||
|
|
||||||
// init {
|
// init {
|
||||||
// groupService.addBeforeRemoveListener(this.clazz.name) { id ->
|
// groupService.addBeforeRemoveListener(this.clazz.name) { id ->
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
package com.synebula.zeus.query.contr
|
|
||||||
|
|
||||||
import com.synebula.gaea.query.IQuery
|
|
||||||
import com.synebula.zeus.query.view.GroupView
|
|
||||||
|
|
||||||
interface IGroupQuery : IQuery<GroupView, String>
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package com.synebula.zeus.query.contr
|
|
||||||
|
|
||||||
import com.synebula.gaea.query.IQuery
|
|
||||||
import com.synebula.zeus.query.view.RoleView
|
|
||||||
|
|
||||||
interface IRoleQuery : IQuery<RoleView, String>
|
|
||||||
Reference in New Issue
Block a user