This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* * | |
* | |
* @Description Spring的ApplicationContext的持有者,可以用静态方法的方式获取spring容器中的bean | |
* @Date 21:07 2018/4/18 | |
*/ | |
@Component | |
public class SpringContextHolder implements ApplicationContextAware { | |
private static ApplicationContext applicationContext; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ApiOperation("上传需求单附件") | |
@PostMapping(value = "${order-trade.mgmt.requirement}/upload/{requirementUuid}", | |
consumes = "multipart/*", | |
headers = "content-type=multipart/form-data") | |
public JsonResult upload(@PathVariable String requirementUuid, | |
@ApiParam(value = "上传文件", required = true) MultipartFile file, | |
@RequestHeader(Constant.HTTP_SECURITY_HEADER) String token){ | |
UserInfo userinfo = getUserInfo(token); | |
String myUuid = userinfo.getUuid(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Mapper | |
public interface TestRequirementMapper { | |
@Results(id = "requirementResult", value = { | |
@Result(column="uuid",property="uuid", id = true), | |
@Result(column="requirement=uuid, creator=myUuid",property="attachments", many = @Many(select = "selectAttachmentsByRequirement")), | |
@Result(column="name_of_requirement",property="name_of_requirement"), | |
@Result(column="cat_of_requirement",property="cat_of_requirement"), | |
@Result(column="statement_of_material",property="statement_of_material"), | |
@Result(column="statement_of_processing",property="statement_of_processing"), | |
@Result(column="estimate_price",property="estimate_price"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
spring: | |
profiles: | |
active: test | |
error: | |
include-exception: true | |
include-stacktrace: always | |
undertow: | |
accesslog: | |
dir: /data/logs/huacai-order-trade | |
enabled: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.配置: | |
pagehelper: | |
reasonable: false | |
params: | |
page-num: pageHelperStart | |
page-size: pageHelperRows | |
count: countSql | |
offset-as-page-num: true | |
support-methods-arguments: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mirrors> | |
<!-- mirror | |
| Specifies a repository mirror site to use instead of a given repository. The repository that | |
| this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | |
| for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | |
| | |
<mirror> | |
<id>mirrorId</id> | |
<mirrorOf>repositoryId</mirrorOf> | |
<name>Human Readable Name for this Mirror.</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class WebMvcConfiguration extends WebMvcConfigurerAdapter { | |
/** | |
* 跨域配置 | |
*/ | |
@Override | |
public void addCorsMappings(CorsRegistry registry) { | |
registry.addMapping("/**") | |
.allowedHeaders("*") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@MapperScan(basePackages = {"com.huacai.counter.jzb.biz.repositories.mappers"}) | |
@EnableConfigurationProperties(DataSourceProperties.class) | |
@EnableTransactionManagement | |
public class MybatisConfiguration { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private final static ObjectMapper OBJECT_MAPPER=new ObjectMapper(); | |
static { | |
OBJECT_MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL); | |
OBJECT_MAPPER.configure(SerializationFeature.INDENT_OUTPUT, Boolean.TRUE); | |
OBJECT_MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); | |
} | |
/** | |
* <p> |
NewerOlder