DevOps 应用集

作者: admin

springboot yaml文件改变server端口和设置显示sql

Posted on 8 7 月, 2020 by admin

Change Server Port in application.yml

...
server:
  port: 8081
...

Show sql

.....
spring:
 datasource:
  jpa:
    show-sql: true
    properties:
      hibernate:
        format_sql: true
Posted in SpringBootLeave a Comment on springboot yaml文件改变server端口和设置显示sql

配置和运行Sona

Posted on 8 7 月, 20208 7 月, 2020 by admin

settings.xml 里加入

<profiles>
<profile>
<id>sonar</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!-- Sonar Host e.g. http://localhost:9000 -->
<sonar.host.url>
http://localhost:9000
</sonar.host.url>
</properties>
</profile>
</profiles>

 

Exclusion files in pom.xml

<sonar.exclusions>

/usr/file1

/usr/file2


</sonar.exclusions>

Run Sona using maven

mvn clean install  sonar:sonar -s /maven/location/settings.xml
Posted in Maven, SonaLeave a Comment on 配置和运行Sona

Mac 脚本DevOps

Posted on 3 1 月, 2020 by admin
  1. 切换到 bash shell
chsh -s /bin/bash 




  1. 根据运行脚本名kill进程
 
kill -9 $(ps aux | grep filename | grep -v grep | awk '{print $2}')
Posted in LinuxTagged Linux, shellLeave a Comment on Mac 脚本DevOps

利用EclipseLink 输出jpa sql

Posted on 27 11 月, 201927 11 月, 2019 by admin
//java code如下

       TypedQuery<?> outputSql = entityManager.createQuery(query);

        org.eclipse.persistence.sessions.Session session = communityEm.unwrap(org.eclipse.persistence.jpa.JpaEntityManager.class).getActiveSession();

        org.eclipse.persistence.queries.DatabaseQuery databaseQuery = outputSql.unwrap(org.eclipse.persistence.jpa.JpaQuery.class).getDatabaseQuery();

        databaseQuery.prepareCall(session, new org.eclipse.persistence.sessions.DatabaseRecord());

        System.out.println("databaseQuery.getSQLString()"+databaseQuery.getSQLString());



Posted in JavaLeave a Comment on 利用EclipseLink 输出jpa sql

Idea工具常用快捷键

Posted on 20 11 月, 2019 by admin
  1. 优化 import java classes
//消除不用的 import classes 
Shift+Command + A , then Enter
  1. Find java file
Control + Shift + O
  1. Find keyword in projects
Control + Shift + F
Posted in Idea, JavaTagged Idea, javaLeave a Comment on Idea工具常用快捷键

文章导航

较旧文章
较新文章

近期文章

  • Oracle表中字段为timestamp值转化为date显示的sql语句
  • 解决idea环境代码保存后不能实时编译的问题
  • 自定义XStream fields序列化顺序
  • Oracle 修改blob为clob,clob为blob
  • Apple Script: 备份Mac Notes到PDFs

近期评论

    归档

    • 2021 年 2 月
    • 2020 年 8 月
    • 2020 年 7 月
    • 2020 年 1 月
    • 2019 年 11 月
    • 2019 年 5 月
    • 2019 年 3 月
    • 2019 年 2 月
    • 2018 年 12 月

    分类

    • Apple Script
    • docker
    • Git
    • gRPC
    • Hana
    • Idea
    • Java
    • Jenkins
    • Linux
    • Maven
    • Mockito
    • Oracle
    • Selenium
    • Sona
    • SpringBoot
    • Tomcat
    • Uncategorized
    • VirtualBox
    • VMWare
    • VPN
    • XML

    其他操作

    • 登录
    • 条目 feed
    • 评论 feed
    • WordPress.org

    bidvertiser

    Powered by DoHints.cn