2. Given the system of inequalities about $x$
$$
\left\{\begin{array}{l}
|x-1|<x+2, \\
x<m
\end{array}\right.
$$

has two integer solutions. Then the range of the real number $m$ is ( ).
(A) $m<0$
(B) $0<m \leqslant 1$
(C) $1<m<2$
(D) $1<m \leqslant 2$
2. D.

It is easy to know,
$$
\begin{array}{l}
|x-1|-\frac{1}{2} \text{.}
\end{array}
$$
Therefore, the solution set of the original inequality system is $-\frac{1}{2}<x<m$. Considering there are two integer solutions, we know $1<m \leqslant 2$.