赞
踩
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <configuration>
- <executable>true</executable><!-- 直接运行,注册服务 -->
- <fork>true</fork> <!-- 如果没有该配置,devtools不会生效 -->
- <includeSystemScope>true</includeSystemScope> <!-- 主要的 -->
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
- <!-- 主要的 -->
- <dependency>
- <groupId>cn.com.westone</groupId>
- <artifactId>wcspsdk</artifactId>
- <version>1.0</version>
- <scope>system</scope>
- <systemPath>${project.basedir}/libs/wcspsdk.jar</systemPath>
- </dependency>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>${java.version}</source>
- <target>${java.version}</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- <compilerArguments>
- <!-- 打包本地jar包 -->
- <extdirs>${project.basedir}/lib</extdirs>
- </compilerArguments>
- </configuration>
- </plugin>
- </plugins>
- </build>
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
- public static String readVideoTime(File source) {
- Encoder encoder = new Encoder();
- String length = "";
- try {
- System.out.println("开始解析视频时长:"+source.getAbsolutePath());
- MultimediaInfo m = encoder.getInfo(source);
- long ls = m.getDuration() / 1000;
- int hour = (int) (ls / 3600);
- int minute = (int) (ls % 3600) / 60;
- int second = (int) (ls - hour * 3600 - minute * 60);
- length = (hour<10?"0":"") + hour + ":" + (minute<10?"0":"") + minute + ":" + (second < 10?"0":"") + second + "";
- System.out.println("解析视频时长结束:"+length);
- } catch (Exception e) {
- length = "-";
- System.err.println(e.getMessage());
- }
- return length;
- }
![](https://csdnimg.cn/release/blogv2/dist/pc/img/newCodeMoreWhite.png)
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。