- 博客(156)
- 资源 (11)
- 收藏
- 关注
原创 mvn package includes all the dependency jar in pom.xml
<plugin><goals></goals><archive><manifest></archive></plugin>
2024-05-09 21:11:08 520
原创 windows下, artemis学习
2. 解压缩到 C:/software/apache-artemis-2.30.0/3. 进入broker,启动。2. 进入到cmd, 执行。启动成功, 进入创建,待续。xbroker被创建。
2023-08-16 16:55:48 344
原创 JPA Procedure 简单调用
不知道是低版本还是oracle的原因。使用MySql时,不加@Param也好用,但是在低版本下,不加@Param,则Oracle会报出。
2023-08-10 15:22:21 136
原创 CriteriaBuilder 联合查询
public List<String> findProdFactoryDesc(String prodtype, String prodName) {CriteriaBuilder cb = entityManager.getCriteriaBuilder();CriteriaQuery<String> cq = cb.createQuery(String.class);Root<Product> prt = cq.from(Product.class);Root<Factory> fct =cq.from
2023-07-28 16:55:58 403
原创 JPA test @DataJpaTest
如果不定义@ContextConfiguration(classes = StdCfg.class), 则默认是整个应用环境,会加载controller, service类,比较麻烦。使用这个标签后,就是单纯的repository层面的bean,简单快捷。当Repository用的是类而不是interface时,我的测试中需要使用@ComponentScan,否则就不能识别,所以我使用了@ComponentScan("repository")@DataJpaTest 执行完test是事务回滚的。
2023-07-28 10:19:38 306
原创 CommandLineRunner, AppContext初始化后自动执行的程序
runappCtx@Component@Componentimplements@Override获取@Component@Order(1)@Override自动注入的方式获取@Component@Order(2)@Autowired@Override执行结果:
2023-07-14 10:00:00 217
原创 sping boot JPA manytomany 死循环
就会出现BLUser.roles>BLRole.users->BLUSER.roles----- Hibernate无限循环一直取下去。告诉hibernate忽略json转换时数据抽取。
2023-06-15 14:55:16 810
原创 hibernate 懒加载
hibernate对于配置延迟加载的对象进行了监听, 当管理的对象被调用时,立即进行数据加载。打印第一行,没有用到address, 则hibernate没有执行查询;打印第二行,用到address,则执行了对address的查询。通过这个小测试,可以看出来hibernate实现的延迟加载功能。从code可以看出,
2023-06-15 11:26:59 999
原创 Spring boot ApplicationContext
对象直接标注annotation: @Configuration, @Component。
2023-06-14 14:30:54 999
原创 因为Json,controller方法单参数 导致脑袋短路
对于单参数方法, 一直喜欢用parameter方式。今天不知道为啥,就想用Json方式,然后无法直接传递。各种自我怀疑,然后尝试。突然醒悟过来,Json方式是key/value模式,单参数String类型,没有key。必须记录一下脑残的实验。
2023-06-13 21:07:43 733
原创 Springboot Annotation
封装:....@Bean@Autowired@Test})@Autowired@Componentpublic class DevDatasourceConfig{}application.properties中定义:@Autowired...web.xmlfile@Test@Autowired@Autowired@Bean} }@Autowired@Bean@Autowired。
2023-06-13 16:11:27 1013
原创 Simple FeignClient and RestTemplate example
2. 消费端的 feign client 定义,3. 消费端的测试controller。
2023-05-24 14:17:42 646
原创 springboot简单的异常处理例子
1. ExceptionHandler仅仅处理当前controller的Exception。在1中处理不了的Exception会在BasicErrorController 进行处理。
2023-05-02 11:45:09 761
原创 简单的redis master slave 配置
master server和slave server启动后,master的数据被复制到了slave server上,用client端就能读取到。只做一个简单的master - slave 配置,新手试炼配置用。使用windows系统。在master client端,set一个数据。在slave client端,get这个数据。前不要有空格,否则服务启动时,识别不出来。
2023-04-28 12:29:10 1117
原创 Vue+axios code 跨域 示例
使用Vue时,对Vue定义数据的访问,需要在mount之后,应该是这是,对象才真正被创建生效吧,继续学习中。.catch(function (error) { // 请求失败处理。一步步走出坑的感觉真不错,希望所帮助!
2023-04-19 15:48:47 176
原创 vue + Jquery ajax 从后台取数据代码
</td></td><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr></td>
2023-04-17 20:16:15 583
原创 docker中启动mysql出错
Docker 中启动mysql,得到如下错误信息。Fatal error: Please read "Security" section of the manual to find out how to run mysqld as root!网上搜索到链接中的文章。Fatal error: Please read “Security“ section of the manual to find out how to run mysqld as root!_huo_wa的博客-CSDN博客 .
2022-01-07 16:14:01 2644
原创 docker中安装Python3
为了简便,使用mysql image, 在运行的container中安装Python31. docker run -v /Users/Shared/dockerdir:/data -p 3306:3306 --name mysql -it mysql /bin/bash2. docker exec -it 21928015976a /bin/bash3. 登陆 mysql docker container后:cd /var/lib/mysql/rm *.*mysqld --initial.
2021-07-16 14:47:08 936
原创 一步一个坑的在docker里安装hadoop
>docker run -v /Users/Shared/dockerdir:/data --name hadoin -it -p 9870:9870 hado /bin/bash>cp /data/hadoop-3.3.0.tar.gz .>tar -zxvf hadoop-3.3.0.tar.gz>docker start hadoin>docker exec -it hadoin /bin/bash#edit the file etc/hadoop/..
2021-06-02 21:13:05 178
原创 create a docker image and run with port map
FROM ubuntu RUN mkdir opt/fsd RUN apt-get update RUN apt install vim --assume-yes ADD jdk-11.0.9_linux-x64_bin.tar.gz opt/fsd ENV JAVA_HOME=/opt/fsd/jdk-11.0.9 ENV PATH=$JAVA_HOME/bin:$PATH ENV CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_H
2020-12-29 11:44:29 90
原创 Jekins+Maven
配置或安装Maven安装Maven plugin查看available页面, 在查询input中输入maven,搜索后找到Maven Integration
2020-12-24 15:43:41 63
原创 Spring boot config server
Config server的设计目的, 对一个系统来讲, 会有许多的service, 每个service都有一个配置文件(application.yml. application.properties). 当service很多时,管理和调整这些配置文件也是一件不简单的工作。于是把service的配置文件放在一个地方,进行统一管理。可以是本地git 目录,也可以放在远程git上。Config server负责把配置文件发放给对应的service。首先,建立一个config server项目。在pom.
2020-12-17 18:41:34 395
原创 Eclipse TreeViewer 例子
Eclipse TreeViewer 例子 package happyview; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Arrays; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Image; i...
2020-11-14 12:36:02 243
转载 eclipse plugin中定义的快捷键
<?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.4"?><plugin> <extension point="org.eclipse.ui.bindings"> <scheme name="%keyConfiguration.common.name" description="%keyConfiguration.common.des...
2020-10-29 17:14:15 217
原创 use css spy 查看 eclipse RCP 组件支持的css
eclipse css 工具https://download.eclipse.org/e4/snapshots/org.eclipse.e4.tools/latest/在run configuration/Plug-ins下, 选中css.spy和相关的plugin在程序运行是window/Spies/CSS Spy, 选中想查看的控件, 可以看到支持的css property...
2020-10-27 10:14:25 244
原创 Git 取消http proxy设置
>git config -l ........ ......... http.proxy=socks5://127.0.0.1:1080 >git config --global --unset http.proxy>>git config -lno http.proxy configuration
2020-09-30 23:21:36 3435
转载 python study - data type
from https://www.w3schools.com/python/python_datatypes.asp
2020-09-29 20:56:01 97
原创 python study-get started
1. download python fro https://www.python.org/2. click on the package to install3. check. python in terminater>python --versionPython 2.7.164. when using python3, you can input python3 >python3 Python 3.8.5 (v3.8.5:580fbb018f, Jul ..
2020-09-29 20:38:41 157
eclipse tree view example
2020-11-13
use cssTheme to set eclipse RCP css
2020-10-27
Functional Requirements and Use Cases
2012-10-17
Development_Process
2007-11-02
Using UML Activity Diagrams for the Process View
2007-08-15
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人