|
2 年前 | |
---|---|---|
gradle/wrapper | 2 年前 | |
src | 2 年前 | |
.gitignore | 2 年前 | |
README.md | 2 年前 | |
build.bat | 2 年前 | |
build.gradle | 2 年前 | |
example.launch.json | 2 年前 | |
gradlew | 2 年前 | |
gradlew.bat | 2 年前 | |
hs_err_pid10376.log | 2 年前 | |
settings.gradle | 2 年前 |
// option 1
items: [
Ext.create('App.test.TestPanel',{
title: 'Title 1'
}),
{
xtype: 'panel',
title: 'Title 2'
}
]
// option 2
requires: ['App.xxxx.XxxxPanel'],
items: [{
xtype: 'test.testPanel',
title: 'Title 1'
}]
me.down('test\\.testPanel') //alias: 'widget.test.testPanel'
// component level
bind: {
text: '{i18n.xx.xx}'
}
// program level
App.getI18n('xx.xx') // or App.getI18n().xx.xx
--liquibase formatted sql
--changeset {name}:{id}
--comment: remarks (optional)
CREATE TABLE `tableName` (
`id` INT PRIMARY KEY AUTO_INCREMENT,
`created` DATETIME NOT NULL DEFAULT NOW(),
`createdBy` VARCHAR(30),
`version` INT NOT NULL DEFAULT 0,
`modified` DATETIME NOT NULL DEFAULT NOW(),
`modifiedBy` VARCHAR(30),
`deleted` BOOLEAN NOT NULL DEFAULT FALSE,
`column1` INT NOT NULL,
`column2` VARCHAR(255)
);
@NotNull
, @NotBlank
, @Min
, @Max
, @Pattern
, etc...)@NotNull
@Pattern(regexp = "^Y$|^N$")
private String YesNo;
@PreAuthorize
DataRes
, IdRes
, RecrodsRes
, SuccessRes
{
"id": 1, //update
"xx": "xx",
"updateLines": [
{
"id": null, // new
"xx": "xx"
},
{
// need a relation check
"id": 1, //update
"xx": "xx"
}
],
// need a relation check
"deleteLineIds": [1, 2]
}
//example
@RestController
@RequestMapping("/xxxx")
public class ExampleController extends AbstractController {
@PostMapping('/xxx') // @GetMapping @DeleteMapping @PutMapping @PatchMapping
//@ResponseStatus(HttpStatus.CREATED)
//@PreAuthorize("hasAuthority('XXX_MAINT')")
public Xxxx api (@RequestBody @Valid ReqClass req) {
}
@GetMapping('/{id}')
public Xxxx getXxx (@PathVariable int id) {
}
}
@Transactional(rollbackFor = Exception.class)
for write, read only not need transaction@Query
public Optional<User> findByUsernameAndDeletedFalse(String username);
// same
@Query("FROM #{#entityName} u WHERE u.deleted = FALSE AND u.username = :username")
public Optional<User> findByUsername(@Param("username") String username);
@NotNull
, @NotBlank
, @Min
, @Max
, @Pattern
, etc...@Autowired
messageSource.getMessage("name", null, LocaleUtils.getLocale());
ExcelUtils.loadTemplate("excel/{filename}");
ExcelUtils.send(response, workbook, "filename"); // will output filename.xlsx
JasperUtils.compile("reports/{filename}", params, new JRBeanCollectionDataSource(xxx), Map.of("subReport1","reports/{filename}"));
JasperUtils.responsePdf(response, jRerpot, "filename"); // will output filename.pdf
X-ATT-DeviceId
X-ATT-Access-Token