Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
项目统一框架
amos-boot-biz
Commits
84848d16
Commit
84848d16
authored
May 27, 2021
by
taabe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加测试表tb_demo
parent
10e625f6
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
28 deletions
+48
-28
AmosJcsApplication.java
...em/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
+9
-8
application-dev.properties
...-jcs-system/src/main/resources/application-dev.properties
+11
-0
application.properties
...boot-jcs-system/src/main/resources/application.properties
+5
-0
CbDemo.java
...main/java/org/amos/boot/module/jcs/api/entity/CbDemo.java
+13
-11
DemoController.java
...g/amos/boot/module/jcs/biz/controller/DemoController.java
+10
-9
No files found.
amos-boot-jcs-system/src/main/java/com/yeejoin/amos/AmosJcsApplication.java
View file @
84848d16
...
@@ -36,7 +36,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
...
@@ -36,7 +36,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.face.*.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.core.auth.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"org.typroject.tyboot.component.*.face.orm.dao*"
,
"org.amos.boot.module.
tzs.biz.dao
.mapper"
})
"org.amos.boot.module.
jcs.api
.mapper"
})
@ComponentScan
(
basePackages
=
{
"org.amos.boot"
,
"org.typroject"
,
"com.yeejoin.amos"
})
@ComponentScan
(
basePackages
=
{
"org.amos.boot"
,
"org.typroject"
,
"com.yeejoin.amos"
})
public
class
AmosJcsApplication
public
class
AmosJcsApplication
{
{
...
@@ -46,12 +46,13 @@ public class AmosJcsApplication
...
@@ -46,12 +46,13 @@ public class AmosJcsApplication
{
{
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmosJcsApplication
.
class
,
args
);
ConfigurableApplicationContext
context
=
SpringApplication
.
run
(
AmosJcsApplication
.
class
,
args
);
Environment
environment
=
context
.
getEnvironment
();
Environment
environment
=
context
.
getEnvironment
();
logger
.
info
(
"The requested service of "
+
environment
.
getProperty
(
"spring.application.name"
)
logger
.
info
(
"The requested service of "
+
environment
.
getProperty
(
"spring.application.name"
)
+
" has already been started in "
+
" has already been started in "
+
environment
.
getProperty
(
"spring.profiles.active"
)
+
""
+
environment
.
getProperty
(
"spring.profiles.active"
)
+
""
+
" environment,and service's url is 'http://localhost:"
+
" environment,and service's url is 'http://localhost:"
+
environment
.
getProperty
(
"server.port"
)
+
"/swagger-ui.html'"
);
+
environment
.
getProperty
(
"server.port"
)
+
environment
.
getProperty
(
"server.servlet.context-path"
)
+
"/swagger-ui.html'"
);
}
}
}
}
amos-boot-jcs-system/src/main/resources/application-dev.properties
0 → 100644
View file @
84848d16
#DB properties:
spring.datasource.driver-class-name
=
com.mysql.cj.jdbc.Driver
spring.datasource.url
=
jdbc:mysql://172.16.10
\
.66:3306/amos_demo?allowMultiQueries=true&serverTimezone=GMT%2B8&characterEncoding=utf8
spring.datasource.username
=
root
spring.datasource.password
=
root_123
#eureka properties:
eureka.instance.hostname
=
172.16.10.72
eureka.instance.prefer-ip-address
=
true
eureka.client.serviceUrl.defaultZone
=
http://${eureka.instance.hostname}:10001/eureka/
amos-boot-jcs-system/src/main/resources/application.properties
View file @
84848d16
spring.application.name
=
AIRPORT
server.servlet.context-path
=
/airPort
server.port
=
11000
spring.profiles.active
=
dev
\ No newline at end of file
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/org/amos/boot/module/jcs/api/entity/CbDemo.java
View file @
84848d16
package
org
.
amos
.
boot
.
module
.
jcs
.
api
.
entity
;
package
org
.
amos
.
boot
.
module
.
jcs
.
api
.
entity
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
/**
* @author DELL
*/
@Data
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
@EqualsAndHashCode
(
callSuper
=
false
)
@TableName
(
"
c
b_demo"
)
@TableName
(
"
t
b_demo"
)
@ApiModel
(
value
=
"
cb_firewarden
对象"
,
description
=
"Demo示例"
)
@ApiModel
(
value
=
"
tb_demo
对象"
,
description
=
"Demo示例"
)
public
class
CbDemo
extends
BaseEntity
{
public
class
CbDemo
extends
BaseEntity
{
/**
*
*/
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"真实名称"
)
private
Long
real_name
;
@ApiModelProperty
(
value
=
"NAME"
)
private
String
name
;
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/org/amos/boot/module/jcs/biz/controller/DemoController.java
View file @
84848d16
package
org
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
package
org
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.List
;
import
io.swagger.annotations.Api
;
import
lombok.extern.slf4j.Slf4j
;
import
org.amos.boot.biz.common.controller.BaseController
;
import
org.amos.boot.biz.common.controller.BaseController
;
import
org.amos.boot.biz.common.utils.CommonResponseUtil
;
import
org.amos.boot.biz.common.utils.CommonResponseUtil
;
import
org.amos.boot.module.jcs.api.entity.CbDemo
;
import
org.amos.boot.module.jcs.api.entity.CbDemo
;
...
@@ -10,10 +10,11 @@ import org.springframework.beans.factory.annotation.Autowired;
...
@@ -10,10 +10,11 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
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
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
io.swagger.annotations.Api
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
/**
* 示例控制类
* 示例控制类
...
@@ -24,15 +25,15 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -24,15 +25,15 @@ import lombok.extern.slf4j.Slf4j;
@RequestMapping
(
"/demo"
)
@RequestMapping
(
"/demo"
)
@Api
(
tags
=
"示例"
)
@Api
(
tags
=
"示例"
)
@Slf4j
@Slf4j
public
class
DemoController
extends
BaseController
{
public
class
DemoController
extends
BaseController
{
@Autowired
@Autowired
private
IDemoService
demoService
;
private
IDemoService
demoService
;
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/user"
)
@GetMapping
(
value
=
"/user"
)
public
ResponseModel
<
Object
>
findUserList
(){
public
ResponseModel
<
Object
>
findUserList
()
{
List
<
CbDemo
>
lists
=
demoService
.
list
();
List
<
CbDemo
>
lists
=
demoService
.
list
();
return
CommonResponseUtil
.
success
(
lists
);
return
CommonResponseUtil
.
success
(
lists
);
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment