Commit 6a75ab8c by 刘运星

change: 初始化配置

parent 91bbc8d2
Pipeline #71255 failed
......@@ -30,11 +30,11 @@
<!--yanxuan-->
<apolloY.client.version>1.0.4-RELEASE</apolloY.client.version>
<dschedule.version>1.0.10-RELEASE</dschedule.version>
<dschedule.version>1.0.7-RELEASE</dschedule.version>
<missa.client.version>1.3.4-RELEASE</missa.client.version>
<eudemon.version>1.0.8-RELEASE</eudemon.version>
<om.monitor.version>2.0.5</om.monitor.version>
<helios.core.version>1.6.5-RELEASE</helios.core.version>
<helios.core.version>1.2.3-RELEASE</helios.core.version>
<yanxuan-log.version>1.0.2</yanxuan-log.version>
<tracer.version>1.0.8-RELEASE</tracer.version>
<shadow.version>1.0.6-RELEASE</shadow.version>
......@@ -59,6 +59,7 @@
<commonsio.version>2.4</commonsio.version>
<commonscollection.version>4.1</commonscollection.version>
<commons.lang.version>2.4</commons.lang.version>
<mybatis.plus.boot.starter.version>3.5.10.1</mybatis.plus.boot.starter.version>
</properties>
......@@ -206,6 +207,14 @@
<version>${netease.ddb.version}</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-bom</artifactId>
<version>3.5.9</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
......@@ -238,13 +247,19 @@
<groupId>com.netease.yanxuan.missa</groupId>
<artifactId>missa-client</artifactId>
</dependency>
<!--其他严选中间件依赖包按需添加-->
<!--
<dependency>
<groupId>com.netease.mail.yanxuan</groupId>
<artifactId>dschedule-core</artifactId>
</dependency>
<dependency>
<groupId>com.netease.om</groupId>
<artifactId>monitor</artifactId>
</dependency>
<!--其他严选中间件依赖包按需添加-->
<!--
<dependency>
<groupId>com.netease.mail.yanxuan</groupId>
<artifactId>dschedule-config-drm</artifactId>
......
package com.netease.yanxuan.wx.store.sharer.assembly;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.netease.yanxuan.missa.client.annotation.EnableMissaClients;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import com.netease.yanxuan.missa.client.annotation.EnableMissaClients;
/**
* 项目启动类
*/
@ComponentScan(basePackages = "com.netease.yanxuan.wx.store.sharer")
@EnableApolloConfig
@EnableMissaClients(basePackages = "com.netease.yanxuan.wx.store.sharer")
@MapperScan(basePackages = "com.netease.yanxuan.wx.store.sharer.dal.mapper")
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
......
/**
* @(#)DrmSharerConfig.java, 2025/3/7.
* <p/>
* Copyright 2025 Netease, Inc. All rights reserved.
* NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.netease.yanxuan.wx.store.sharer.biz.config;
import com.ctrip.framework.apollo.spring.annotation.EnableAutoUpdateApolloConfig;
/**
* 推客配置apo
* @author 刘运星 (liuyunxing01@corp.netease.com)
*/
@EnableAutoUpdateApolloConfig("sharer-config")
public class DrmSharerConfig {
}
\ No newline at end of file
......@@ -32,7 +32,7 @@
</dependency>
-->
<!-- store-redis
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
......@@ -41,7 +41,15 @@
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
</dependency>
-->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-jsqlparser-4.9</artifactId>
</dependency>
</dependencies>
</project>
\ No newline at end of file
/**
* @(#)GalaxyMetaObjectHandler.java, 2024/9/2.
* <p/>
* Copyright 2024 Netease, Inc. All rights reserved. NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license
* terms.
*/
package com.netease.yanxuan.wx.store.sharer.dal.config;
import java.util.Date;
import org.apache.ibatis.reflection.MetaObject;
import org.springframework.stereotype.Component;
import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler;
/**
* 配置自动填充插件
* @author 刘运星 (liuyunxing01@corp.netease.com)
*/
@Component
public class GalaxyMetaObjectHandler implements MetaObjectHandler {
@Override
public void insertFill(MetaObject metaObject) {
this.strictInsertFill(metaObject, "createTime", Date.class, new Date());
this.strictUpdateFill(metaObject, "updateTime", Date.class, new Date());
}
@Override
public void updateFill(MetaObject metaObject) {
this.strictUpdateFill(metaObject, "updateTime", Date.class, new Date());
}
}
/**
* @(#)MybatisConfig.java, 2024/9/2.
* <p/>
* Copyright 2024 Netease, Inc. All rights reserved. NETEASE PROPRIETARY/CONFIDENTIAL. Use is subject to license
* terms.
*/
package com.netease.yanxuan.wx.store.sharer.dal.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
/**
* 配置分页插件
* @author 刘运星 (liuyunxing01@corp.netease.com)
*/
@Configuration
public class MybatisConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}
log:
level: debug
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/work?useTimezone=true&serverTimezone=GMT%2B8
username:
password:
log:
level: info
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url:
username:
password:
log:
level: debug
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url:
username:
password:
log:
level: debug
spring:
datasource:
driver-class-name: com.mysql.jdbc.Driver
url:
username:
password:
spring:
application:
name: yanxuan-wx-store-sharer
name: tob-galaxy-material
profiles:
active: dev
log:
level: info
path: /home/logs/yanxuan-wx-store-sharer
path: /home/logs/tob-galaxy-material
maxHistory: 15
maxSize: 200MB
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment