custom page sql xml <select id="selectPages" resultType="com.example.domain.vo.UserVo"> select u.user_name, u.real_real from user u ${ew.customSqlSegment} order by u.sort_num desc </select> mapper public interface UserMapper extends BaseMapper<User> { IPage<UserVo> selectPages(IPage<UserVo> page,@Param(Constants.WRAPPER) Wrapper<User> ex); } service @Service public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService { @Override public IPage<UserVo> pages(UserPageDto dto){ QueryWrapper<User> query = new QueryWrapper<>(); query.eq(StringUtils.hasText(dto.getUserName()), "u.user_name",dto.getUserName()); query.like(StringUtils.hasText(dto.getRealName()), "u.real_name",dto.getRealName()); Page<User> page = new Page(1,10); IPage<UserVo> result = this.getBaseMapper().selectPages(page, query); return result; } }
commands # Java java -jar "-Dloader.path=./lib" ./ROOT.jar --spring.profiles.active=test -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom # Maven mvn clean package -DskipTests Docker docker-compose.yml ``` - Dockerfile base image FROM openjdk:8-alpine FROM openjdk:17-jdk-alpine font RUN apk update && apk add --no-cache ttf-dejavu fontconfig author LABEL author="katzhen" port EXPOSE 9082 aa jar ADD ROOT.jar ROOT.jar add lib ADD lib lib add yml ADD application-prod.yml application-prod.yml set variables -Xmx ENV JAVA_OPTS="-Xmx512m -Dspring.profiles.active=prod" exec Support graceful shutdown -Duser.timezone -Djava.security.egd Improving random number generation efficiency ENTRYPOINT ["sh","-c","exec java $JAVA_OPTS -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom -jar '-Dloader.path=./lib' ROOT.jar" ] ### winsw.xml ```xml user-service User Service User Service java -jar "-Dloader.path=./lib" ./ROOT.jar --spring.profiles.active=prod -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom Automatic reset