Pārlūkot izejas kodu

发布正式版本至http://print.ubtob.com/report;不同步jasperserver资源;

sunyj 9 gadi atpakaļ
vecāks
revīzija
d6de422c60

+ 7 - 0
pom.xml

@@ -26,6 +26,13 @@
 				<profile>test</profile>
 			</properties>
 		</profile>
+		<!-- 正式环境 -->
+		<profile>
+			<id>prod</id>
+			<properties>
+				<profile>prod</profile>
+			</properties>
+		</profile>
 	</profiles>
 
 	<properties>

+ 8 - 9
src/main/java/com/uas/report/service/impl/PrintServiceImpl.java

@@ -5,7 +5,6 @@ import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
-import java.net.URISyntaxException;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
@@ -33,7 +32,6 @@ import com.itextpdf.text.pdf.PdfCopy;
 import com.itextpdf.text.pdf.PdfReader;
 import com.uas.report.core.exception.ReportException;
 import com.uas.report.service.PrintService;
-import com.uas.report.service.ResourceService;
 import com.uas.report.support.SysConf;
 import com.uas.report.util.ContextUtils;
 import com.uas.report.util.ReportConstants;
@@ -66,8 +64,8 @@ public class PrintServiceImpl implements PrintService {
 	@Autowired
 	private SysConf sysConf;
 
-	@Autowired
-	private ResourceService resourceService;
+	// @Autowired
+	// private ResourceService resourceService;
 
 	private Logger logger = Logger.getLogger(getClass());
 
@@ -296,11 +294,12 @@ public class PrintServiceImpl implements PrintService {
 	 */
 	private Map<String, Object> print(String userName, String reportName, String whereCondition, String otherParameters,
 			String exportFileType, Integer pageIndex, DataSource dataSource) {
-		try {
-			resourceService.syncResources(userName);
-		} catch (URISyntaxException | IOException e) {
-			throw new ReportException(e).setDetailedMessage(e);
-		}
+		// TODO 重新实现jasperserver接口
+		// try {
+		// resourceService.syncResources(userName);
+		// } catch (URISyntaxException | IOException e) {
+		// throw new ReportException(e).setDetailedMessage(e);
+		// }
 
 		// 报表路径为报表根路径REPORT_DIR + 当前账套用户名userName
 		String reportDir = new StringBuilder(sysConf.getLocalBaseDir()).append("/").append(userName).toString();

+ 22 - 0
src/main/resources/prod/jdbc-b2c.properties

@@ -0,0 +1,22 @@
+#B2C
+#dev
+jdbc.b2c.dev.url=jdbc:oracle:thin:@192.168.253.6:1521:orcl
+jdbc.b2c.dev.username=uuplatformdemo
+jdbc.b2c.dev.password=selectuuplatform
+#test
+jdbc.b2c.test.url=jdbc:oracle:thin:@192.168.253.6:1521:orcl
+jdbc.b2c.test.username=uuplatformdemo
+jdbc.b2c.test.password=selectuuplatform
+#prod
+jdbc.b2c.prod.url=jdbc:oracle:thin:@10.10.100.200:1521:orcl
+jdbc.b2c.prod.username=platform$b2b
+jdbc.b2c.prod.password=select*fromuu
+#other configuration
+jdbc.b2c.driverClassName=oracle.jdbc.driver.OracleDriver
+jdbc.b2c.initialSize=1
+jdbc.b2c.maxActive=100
+jdbc.b2c.maxIdle=50
+jdbc.b2c.minIdle=50
+jdbc.b2c.suspectTimeout=60
+jdbc.b2c.timeBetweenEvictionRunsMillis=30000
+jdbc.b2c.minEvictableIdleTimeMillis=60000

+ 12 - 0
src/main/resources/prod/jdbc-uas.properties

@@ -0,0 +1,12 @@
+#多账套情况下的主账套
+jdbc.driverClassName=oracle.jdbc.driver.OracleDriver
+jdbc.url=jdbc:oracle:thin:@192.168.253.6:1521:orcl
+jdbc.username=UAS
+jdbc.password=select!#%*(
+jdbc.initialSize=10
+jdbc.maxActive=100
+jdbc.maxIdle=50
+jdbc.minIdle=50
+jdbc.suspectTimeout=60
+jdbc.timeBetweenEvictionRunsMillis=30000
+jdbc.minEvictableIdleTimeMillis=60000

+ 8 - 0
src/main/resources/prod/js-rest-api.properties

@@ -0,0 +1,8 @@
+schema=http
+host=192.168.253.60
+port=8080
+contextRoot=jasperserver
+rest=rest_v2
+resources=resources
+authorization=amFzcGVyYWRtaW46amFzcGVyYWRtaW4=
+images=Picture

+ 15 - 0
src/main/resources/prod/logging.properties

@@ -0,0 +1,15 @@
+#Tomcat Logger
+
+handlers = org.apache.juli.FileHandler, java.util.logging.ConsoleHandler   
+  
+############################################################   
+# Handler specific properties.   
+# Describes specific configuration info for Handlers.   
+############################################################   
+  
+org.apache.juli.FileHandler.level = FINE   
+org.apache.juli.FileHandler.directory = ${catalina.base}/logs   
+org.apache.juli.FileHandler.prefix = error-debug.   
+  
+java.util.logging.ConsoleHandler.level = FINE   
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

+ 5 - 0
src/main/resources/prod/sys.properties

@@ -0,0 +1,5 @@
+localBaseDir=/opt/report/data
+localImagesDir=/Picture
+localJrxmlDir=/jrxml
+standardMaster=STANDARD_MASTER
+standardJrxmlsUrl=http://print.ubtob.com/report/file/standardJrxmls?onlyData=1