mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-01-09 11:45:16 +01:00
WIP
This commit is contained in:
parent
169c6e6538
commit
b74ebc0d4f
@ -2,17 +2,20 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<artifactId>wise-webapp</artifactId>
|
<artifactId>wise-webapp</artifactId>
|
||||||
<packaging>war</packaging>
|
|
||||||
<name>WiseMapping Webapp</name>
|
<name>WiseMapping Webapp</name>
|
||||||
<url>http://www.wisemapping.org</url>
|
<url>http://www.wisemapping.org</url>
|
||||||
|
<version>5.1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.wisemapping</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>wisemapping</artifactId>
|
<artifactId>spring-boot-starter-parent</artifactId>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<version>3.1.2</version>
|
||||||
<version>5.1.0-SNAPSHOT</version>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<com.wisemapping.version>5.1.0-SNAPSHOT</com.wisemapping.version>
|
||||||
|
<maven.compiler.source>17</maven.compiler.source>
|
||||||
|
<maven.compiler.target>17</maven.compiler.target>
|
||||||
<org.springframework.version>6.0.11</org.springframework.version>
|
<org.springframework.version>6.0.11</org.springframework.version>
|
||||||
<org.springframework.addons>6.1.2</org.springframework.addons>
|
<org.springframework.addons>6.1.2</org.springframework.addons>
|
||||||
<hibernate.version>6.2.6.Final</hibernate.version>
|
<hibernate.version>6.2.6.Final</hibernate.version>
|
||||||
@ -33,6 +36,27 @@
|
|||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-web</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-tomcat</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
<artifactId>spring-boot-starter-mail</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.testng</groupId>
|
<groupId>org.testng</groupId>
|
||||||
<artifactId>testng</artifactId>
|
<artifactId>testng</artifactId>
|
||||||
@ -45,39 +69,33 @@
|
|||||||
<version>12.0</version>
|
<version>12.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<!-- <artifactId>spring-messaging</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- </dependency>-->
|
||||||
</dependency>
|
<!-- <dependency>-->
|
||||||
<dependency>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <artifactId>spring-websocket</artifactId>-->
|
||||||
<artifactId>spring-messaging</artifactId>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- </dependency>-->
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework</groupId>
|
|
||||||
<artifactId>spring-websocket</artifactId>
|
|
||||||
<version>${org.springframework.version}</version>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.postgresql</groupId>
|
<groupId>org.postgresql</groupId>
|
||||||
<artifactId>postgresql</artifactId>
|
<artifactId>postgresql</artifactId>
|
||||||
<version>42.5.4</version>
|
<version>42.5.4</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-beans</artifactId>
|
<!-- <artifactId>spring-beans</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-tx</artifactId>
|
<!-- <artifactId>spring-tx</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework.security</groupId>
|
<groupId>org.springframework.security</groupId>
|
||||||
<artifactId>spring-security-taglibs</artifactId>
|
<artifactId>spring-security-taglibs</artifactId>
|
||||||
@ -90,6 +108,12 @@
|
|||||||
<version>5.6.15.Final</version>
|
<version>5.6.15.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>jakarta.xml.bind</groupId>
|
||||||
|
<artifactId>jakarta.xml.bind-api</artifactId>
|
||||||
|
<version>4.0.0</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- Hibernate Validator -->
|
<!-- Hibernate Validator -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate.validator</groupId>
|
<groupId>org.hibernate.validator</groupId>
|
||||||
@ -97,78 +121,72 @@
|
|||||||
<version>8.0.1.Final</version>
|
<version>8.0.1.Final</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-orm</artifactId>
|
<!-- <artifactId>spring-orm</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-context</artifactId>
|
<!-- <artifactId>spring-context</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-web</artifactId>
|
<!-- <artifactId>spring-web</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-oxm</artifactId>
|
<!-- <artifactId>spring-oxm</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-context-support</artifactId>
|
<!-- <artifactId>spring-context-support</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.data</groupId>
|
<!-- <groupId>org.springframework.data</groupId>-->
|
||||||
<artifactId>spring-data-jpa</artifactId>
|
<!-- <artifactId>spring-data-jpa</artifactId>-->
|
||||||
<version>2.6.1</version>
|
<!-- <version>3.1.0</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-test</artifactId>
|
<!-- <artifactId>spring-test</artifactId>-->
|
||||||
<version>5.3.15</version>
|
<!-- <version>6.0.6</version>-->
|
||||||
<scope>test</scope>
|
<!-- <scope>test</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
|
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-aop</artifactId>
|
<!-- <artifactId>spring-aop</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>runtime</scope>
|
<!-- <scope>runtime</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.security</groupId>
|
<!-- <groupId>org.springframework.security</groupId>-->
|
||||||
<artifactId>spring-security-web</artifactId>
|
<!-- <artifactId>spring-security-core</artifactId>-->
|
||||||
<version>${org.springframework.addons}</version>
|
<!-- <version>${org.springframework.addons}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework.security</groupId>
|
<!-- <groupId>org.springframework</groupId>-->
|
||||||
<artifactId>spring-security-core</artifactId>
|
<!-- <artifactId>spring-jdbc</artifactId>-->
|
||||||
<version>${org.springframework.addons}</version>
|
<!-- <version>${org.springframework.version}</version>-->
|
||||||
<scope>compile</scope>
|
<!-- <scope>runtime</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.springframework</groupId>
|
<!-- <groupId>aopalliance</groupId>-->
|
||||||
<artifactId>spring-jdbc</artifactId>
|
<!-- <artifactId>aopalliance</artifactId>-->
|
||||||
<version>${org.springframework.version}</version>
|
<!-- <version>1.0</version>-->
|
||||||
<scope>runtime</scope>
|
<!-- <scope>compile</scope>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<dependency>
|
|
||||||
<groupId>aopalliance</groupId>
|
|
||||||
<artifactId>aopalliance</artifactId>
|
|
||||||
<version>1.0</version>
|
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>jakarta.mail</groupId>
|
<groupId>jakarta.mail</groupId>
|
||||||
<artifactId>jakarta.mail-api</artifactId>
|
<artifactId>jakarta.mail-api</artifactId>
|
||||||
@ -179,21 +197,21 @@
|
|||||||
<artifactId>mysql-connector-j</artifactId>
|
<artifactId>mysql-connector-j</artifactId>
|
||||||
<version>8.1.0</version>
|
<version>8.1.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<!-- <dependency>-->
|
||||||
<groupId>org.apache.commons</groupId>
|
<!-- <groupId>org.apache.commons</groupId>-->
|
||||||
<artifactId>commons-dbcp2</artifactId>
|
<!-- <artifactId>commons-dbcp2</artifactId>-->
|
||||||
<version>2.9.0</version>
|
<!-- <version>2.9.0</version>-->
|
||||||
</dependency>
|
<!-- </dependency>-->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>org.hibernate</groupId>-->
|
<!-- <groupId>org.hibernate</groupId>-->
|
||||||
<!-- <artifactId>hibernate-ehcache</artifactId>-->
|
<!-- <artifactId>hibernate-ehcache</artifactId>-->
|
||||||
<!-- <version>5.6.15.Final</version>-->
|
<!-- <version>5.6.15.Final</version>-->
|
||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
<!-- <dependency>-->
|
<!-- <dependency>-->
|
||||||
<!-- <groupId>javax.cache</groupId>-->
|
<!-- <groupId>javax.cache</groupId>-->
|
||||||
<!-- <artifactId>cache-api</artifactId>-->
|
<!-- <artifactId>cache-api</artifactId>-->
|
||||||
<!-- <version>1.1.1</version>-->
|
<!-- <version>1.1.1</version>-->
|
||||||
<!-- </dependency>-->
|
<!-- </dependency>-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
@ -282,10 +300,9 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hsqldb</groupId>
|
<groupId>org.hsqldb</groupId>
|
||||||
<artifactId>hsqldb</artifactId>
|
<artifactId>hsqldb</artifactId>
|
||||||
<version>2.7.1</version>
|
<version>2.7.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>drop-schemas</id>
|
<id>drop-schemas</id>
|
||||||
@ -357,27 +374,6 @@
|
|||||||
</profiles>
|
</profiles>
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<!-- <plugin>-->
|
|
||||||
<!-- <groupId>org.hibernate.orm.tooling</groupId>-->
|
|
||||||
<!-- <artifactId>hibernate-enhance-maven-plugin</artifactId>-->
|
|
||||||
<!-- <version>${hibernate.version}</version>-->
|
|
||||||
<!-- <executions>-->
|
|
||||||
<!-- <execution>-->
|
|
||||||
<!-- <phase>compile</phase>-->
|
|
||||||
<!-- <configuration>-->
|
|
||||||
<!-- <failOnError>true</failOnError>-->
|
|
||||||
<!-- <enableLazyInitialization>true</enableLazyInitialization>-->
|
|
||||||
<!-- <enableDirtyTracking>true</enableDirtyTracking>-->
|
|
||||||
<!-- <enableAssociationManagement>true</enableAssociationManagement>-->
|
|
||||||
<!-- <enableExtendedEnhancement>false</enableExtendedEnhancement>-->
|
|
||||||
<!-- <enableExtendedEnhancement>false</enableExtendedEnhancement>-->
|
|
||||||
<!-- </configuration>-->
|
|
||||||
<!-- <goals>-->
|
|
||||||
<!-- <goal>enhance</goal>-->
|
|
||||||
<!-- </goals>-->
|
|
||||||
<!-- </execution>-->
|
|
||||||
<!-- </executions>-->
|
|
||||||
<!-- </plugin>-->
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
@ -418,6 +414,8 @@
|
|||||||
</webResources>
|
</webResources>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
package com.wisemapping.config;
|
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.HandlerExceptionResolver;
|
|
||||||
import org.springframework.web.servlet.ViewResolver;
|
|
||||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|
||||||
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
|
|
||||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
|
||||||
import org.springframework.web.servlet.view.JstlView;
|
|
||||||
|
|
||||||
@EnableWebMvc
|
|
||||||
@Configuration
|
|
||||||
public class AppConfig {
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
HandlerExceptionResolver errorHandler() {
|
|
||||||
final SimpleMappingExceptionResolver result = new SimpleMappingExceptionResolver();
|
|
||||||
|
|
||||||
//mapping status code with view response.
|
|
||||||
result.addStatusCode("reactInclude", 403);
|
|
||||||
|
|
||||||
//setting default error view
|
|
||||||
result.setDefaultErrorView("reactInclude");
|
|
||||||
result.setDefaultStatusCode(500);
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public ViewResolver viewResolver(){
|
|
||||||
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
|
|
||||||
resolver.setPrefix("/WEB-INF/views/");
|
|
||||||
resolver.setSuffix(".jsp");
|
|
||||||
resolver.setViewClass(JstlView.class);
|
|
||||||
return resolver;
|
|
||||||
}
|
|
||||||
}
|
|
@ -0,0 +1,56 @@
|
|||||||
|
package com.wisemapping.config;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.jdbc.DataSourceBuilder;
|
||||||
|
import org.springframework.context.annotation.*;
|
||||||
|
import org.springframework.web.servlet.HandlerExceptionResolver;
|
||||||
|
import org.springframework.web.servlet.ViewResolver;
|
||||||
|
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
|
||||||
|
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||||
|
import org.springframework.web.servlet.view.JstlView;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
@ImportResource("spring/wisemapping.xml")
|
||||||
|
@ComponentScan
|
||||||
|
public class Application {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(Application.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
HandlerExceptionResolver errorHandler() {
|
||||||
|
final SimpleMappingExceptionResolver result = new SimpleMappingExceptionResolver();
|
||||||
|
|
||||||
|
//mapping status code with view response.
|
||||||
|
result.addStatusCode("reactInclude", 403);
|
||||||
|
|
||||||
|
//setting default error view
|
||||||
|
result.setDefaultErrorView("reactInclude");
|
||||||
|
result.setDefaultStatusCode(500);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public ViewResolver viewResolver() {
|
||||||
|
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
|
||||||
|
resolver.setPrefix("/WEB-INF/views/");
|
||||||
|
resolver.setSuffix(".jsp");
|
||||||
|
resolver.setViewClass(JstlView.class);
|
||||||
|
return resolver;
|
||||||
|
}
|
||||||
|
// @Bean
|
||||||
|
// public DataSource getDataSource() {
|
||||||
|
// DataSourceBuilder dataSourceBuilder = DataSourceBuilder.create();
|
||||||
|
// dataSourceBuilder.username("SA");
|
||||||
|
// dataSourceBuilder.password("");
|
||||||
|
// dataSourceBuilder.url("jdbc:hsqldb:file:/db/wisemapping");
|
||||||
|
// dataSourceBuilder.driverClassName("org.hsqldb.jdbc.JDBCDriver");
|
||||||
|
// return dataSourceBuilder.build();
|
||||||
|
// }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -20,9 +20,9 @@ import org.springframework.web.servlet.handler.HandlerMappingIntrospector;
|
|||||||
|
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@EnableWebSecurity
|
//@EnableWebSecurity
|
||||||
public class SecurityConfig {
|
public class SecurityConfig {
|
||||||
@Autowired
|
// @Autowired
|
||||||
UserService userService;
|
UserService userService;
|
||||||
|
|
||||||
@Value("${admin.user}")
|
@Value("${admin.user}")
|
||||||
@ -122,11 +122,11 @@ public class SecurityConfig {
|
|||||||
|
|
||||||
return http.authorizeHttpRequests(
|
return http.authorizeHttpRequests(
|
||||||
(auth) ->
|
(auth) ->
|
||||||
auth.requestMatchers(restfullMapper.pattern("/static/**")).permitAll().
|
auth.requestMatchers("/static/**").permitAll().
|
||||||
requestMatchers(restfullMapper.pattern("/css/**")).permitAll().
|
requestMatchers("/css/**").permitAll().
|
||||||
requestMatchers(restfullMapper.pattern("/js/**")).permitAll().
|
requestMatchers("/js/**").permitAll().
|
||||||
requestMatchers(restfullMapper.pattern("/images/**")).permitAll().
|
requestMatchers("/images/**").permitAll().
|
||||||
requestMatchers(restfullMapper.pattern("/*")).permitAll()
|
requestMatchers("/*").permitAll()
|
||||||
).build();
|
).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,11 +21,6 @@ package com.wisemapping.dao;
|
|||||||
import com.wisemapping.model.*;
|
import com.wisemapping.model.*;
|
||||||
import com.wisemapping.util.ZipUtils;
|
import com.wisemapping.util.ZipUtils;
|
||||||
import jakarta.persistence.Query;
|
import jakarta.persistence.Query;
|
||||||
import org.hibernate.Criteria;
|
|
||||||
import org.hibernate.criterion.Junction;
|
|
||||||
import org.hibernate.criterion.Order;
|
|
||||||
import org.hibernate.criterion.Restrictions;
|
|
||||||
import org.hibernate.criterion.SimpleExpression;
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.springframework.orm.hibernate5.HibernateTemplate;
|
import org.springframework.orm.hibernate5.HibernateTemplate;
|
||||||
@ -62,13 +57,14 @@ public class MindmapManagerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MindMapHistory> getHistoryFrom(int mindmapId) {
|
public List<MindMapHistory> getHistoryFrom(int mindmapId) {
|
||||||
final Criteria hibernateCriteria = currentSession().createCriteria(MindMapHistory.class);
|
// final Criteria hibernateCriteria = currentSession().createCriteria(MindMapHistory.class);
|
||||||
hibernateCriteria.add(Restrictions.eq("mindmapId", mindmapId));
|
// hibernateCriteria.add(Restrictions.eq("mindmapId", mindmapId));
|
||||||
hibernateCriteria.addOrder(Order.desc("creationTime"));
|
// hibernateCriteria.addOrder(Order.desc("creationTime"));
|
||||||
|
//
|
||||||
// This line throws errors in some environments, so getting all history and taking firsts 10 records
|
// // This line throws errors in some environments, so getting all history and taking firsts 10 records
|
||||||
hibernateCriteria.setMaxResults(30);
|
// hibernateCriteria.setMaxResults(30);
|
||||||
return hibernateCriteria.list();
|
// return hibernateCriteria.list();
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -83,11 +79,11 @@ public class MindmapManagerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void purgeHistory(int mapId) throws IOException {
|
public void purgeHistory(int mapId) throws IOException {
|
||||||
final Criteria hibernateCriteria = currentSession().createCriteria(MindMapHistory.class);
|
// final Criteria hibernateCriteria = currentSession().createCriteria(MindMapHistory.class);
|
||||||
hibernateCriteria.add(Restrictions.eq("mindmapId", mapId));
|
// hibernateCriteria.add(Restrictions.eq("mindmapId", mapId));
|
||||||
hibernateCriteria.addOrder(Order.desc("creationTime"));
|
// hibernateCriteria.addOrder(Order.desc("creationTime"));
|
||||||
|
|
||||||
final List<MindMapHistory> historyList = hibernateCriteria.list();
|
final List<MindMapHistory> historyList = null;
|
||||||
|
|
||||||
final Mindmap mindmap = this.getMindmapById(mapId);
|
final Mindmap mindmap = this.getMindmapById(mapId);
|
||||||
if (mindmap != null) {
|
if (mindmap != null) {
|
||||||
@ -127,30 +123,31 @@ public class MindmapManagerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Mindmap> search(MindMapCriteria criteria, int maxResult) {
|
public List<Mindmap> search(MindMapCriteria criteria, int maxResult) {
|
||||||
final Criteria hibernateCriteria = currentSession().createCriteria(Mindmap.class);
|
// final Criteria hibernateCriteria = currentSession().createCriteria(Mindmap.class);
|
||||||
//always search public maps
|
// //always search public maps
|
||||||
hibernateCriteria.add(Restrictions.like("public", Boolean.TRUE));
|
// hibernateCriteria.add(Restrictions.like("public", Boolean.TRUE));
|
||||||
|
//
|
||||||
if (criteria != null) {
|
// if (criteria != null) {
|
||||||
final Junction junction;
|
// final Junction junction;
|
||||||
if (criteria.isOrCriteria()) {
|
// if (criteria.isOrCriteria()) {
|
||||||
junction = Restrictions.disjunction();
|
// junction = Restrictions.disjunction();
|
||||||
} else {
|
// } else {
|
||||||
junction = Restrictions.conjunction();
|
// junction = Restrictions.conjunction();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (criteria.getTitle() != null && criteria.getTitle().length() > 0) {
|
// if (criteria.getTitle() != null && criteria.getTitle().length() > 0) {
|
||||||
final SimpleExpression titleRestriction = Restrictions.like("title", "%" + criteria.getTitle() + "%");
|
// final SimpleExpression titleRestriction = Restrictions.like("title", "%" + criteria.getTitle() + "%");
|
||||||
junction.add(titleRestriction);
|
// junction.add(titleRestriction);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
if (criteria.getDescription() != null && criteria.getDescription().length() > 0) {
|
// if (criteria.getDescription() != null && criteria.getDescription().length() > 0) {
|
||||||
final SimpleExpression descriptionRestriction = Restrictions.like("description", "%" + criteria.getDescription() + "%");
|
// final SimpleExpression descriptionRestriction = Restrictions.like("description", "%" + criteria.getDescription() + "%");
|
||||||
junction.add(descriptionRestriction);
|
// junction.add(descriptionRestriction);
|
||||||
}
|
// }
|
||||||
hibernateCriteria.add(junction);
|
// hibernateCriteria.add(junction);
|
||||||
}
|
// }
|
||||||
return hibernateCriteria.list();
|
// return hibernateCriteria.list();
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -221,17 +218,17 @@ public class MindmapManagerImpl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeMindmap(@NotNull final Mindmap mindmap) {
|
public void removeMindmap(@NotNull final Mindmap mindmap) {
|
||||||
// Delete history first ...
|
// // Delete history first ...
|
||||||
final Criteria hibernateCriteria = currentSession().createCriteria(MindMapHistory.class);
|
// final Criteria hibernateCriteria = currentSession().createCriteria(MindMapHistory.class);
|
||||||
hibernateCriteria.add(Restrictions.eq("mindmapId", mindmap.getId()));
|
// hibernateCriteria.add(Restrictions.eq("mindmapId", mindmap.getId()));
|
||||||
final List list = hibernateCriteria.list();
|
// final List list = hibernateCriteria.list();
|
||||||
getHibernateTemplate().deleteAll(list);
|
// getHibernateTemplate().deleteAll(list);
|
||||||
|
//
|
||||||
// Remove collaborations ...
|
// // Remove collaborations ...
|
||||||
mindmap.removedCollaboration(mindmap.getCollaborations());
|
// mindmap.removedCollaboration(mindmap.getCollaborations());
|
||||||
|
//
|
||||||
// Delete mindmap ....
|
// // Delete mindmap ....
|
||||||
getHibernateTemplate().delete(mindmap);
|
// getHibernateTemplate().delete(mindmap);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveHistory(@NotNull final Mindmap mindMap) {
|
private void saveHistory(@NotNull final Mindmap mindMap) {
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
|
|
||||||
|
|
||||||
# HSQL Configuration properties
|
# HSQL Configuration properties
|
||||||
|
database.base.url=/Users/veigap/repos/wisemapping-open-source/wise-webapp/target/
|
||||||
database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping
|
database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping
|
||||||
database.driver=org.hsqldb.jdbc.JDBCDriver
|
database.driver=org.hsqldb.jdbc.JDBCDriver
|
||||||
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
database.hibernate.dialect=org.hibernate.dialect.HSQLDialect
|
||||||
@ -89,7 +90,7 @@ google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
|
|||||||
admin.user = admin@wisemapping.org
|
admin.user = admin@wisemapping.org
|
||||||
|
|
||||||
# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
|
# Base URL where WiseMapping is deployed. By default, It will be automatically inferred.
|
||||||
#site.baseurl = http://localhost:8080
|
site.baseurl = http://localhost:8080
|
||||||
|
|
||||||
# Site Homepage URL. This will be used as URL for homepage location.
|
# Site Homepage URL. This will be used as URL for homepage location.
|
||||||
site.homepage = c/login
|
site.homepage = c/login
|
||||||
@ -149,9 +150,7 @@ security.oauth2.google.confirmUrl=https://oauth2.googleapis.com/token
|
|||||||
# Google service for get user data (name, email, etc)
|
# Google service for get user data (name, email, etc)
|
||||||
security.oauth2.google.userinfoUrl=https://www.googleapis.com/oauth2/v3/userinfo
|
security.oauth2.google.userinfoUrl=https://www.googleapis.com/oauth2/v3/userinfo
|
||||||
# Url for starting auth process with google
|
# Url for starting auth process with google
|
||||||
security.oauth2.google.url=https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=${security.oauth2.google.callbackUrl}&prompt=consent&response_type=code&client_id=${security.oauth2.google.clientId}&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&state=wisemapping&include_granted_scopes=true
|
security.oauth2.google.url=https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=${security.oauth2.google.callbackUrl:''}&prompt=consent&response_type=code&client_id=${security.oauth2.google.clientId:''}&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&state=wisemapping&include_granted_scopes=true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#######################################################################################
|
#######################################################################################
|
||||||
@ -161,3 +160,10 @@ security.oauth2.google.url=https://accounts.google.com/o/oauth2/v2/auth?redirect
|
|||||||
# Coma separated list of domains and emails ban
|
# Coma separated list of domains and emails ban
|
||||||
#accounts.exclusion.domain=
|
#accounts.exclusion.domain=
|
||||||
|
|
||||||
|
|
||||||
|
#spring.main.allow-bean-definition-overriding=true
|
||||||
|
|
||||||
|
spring.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver
|
||||||
|
spring.datasource.url=jdbc:hsqldb:file:/Users/veigap/repos/wisemapping-open-source/wise-webapp/target/db/wisemapping
|
||||||
|
spring.datasource.username=sa
|
||||||
|
spring.datasource.password=
|
1
wise-webapp/src/main/resources/public/static/mindplot
Symbolic link
1
wise-webapp/src/main/resources/public/static/mindplot
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../wise-ui/target/wisemapping-mindplot/package/dist
|
1
wise-webapp/src/main/resources/public/static/webapp
Symbolic link
1
wise-webapp/src/main/resources/public/static/webapp
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../wise-ui/target/wisemapping-webapp/package/dist
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<bean id="updateSecurityAdvisor"
|
<bean id="updateSecurityAdvisor"
|
||||||
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
|
||||||
<property name="advice" ref="updateSecurityAdvice"/>
|
<!-- <property name="advice" ref="updateSecurityAdvice"/>-->
|
||||||
<property name="mappedNames">
|
<property name="mappedNames">
|
||||||
<list>
|
<list>
|
||||||
<value>save*</value>
|
<value>save*</value>
|
@ -5,7 +5,7 @@
|
|||||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
<bean id="mindmapSessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
|
<bean id="mindmapSessionFactory" class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
|
||||||
<property name="dataSource" ref="wiseDataSource"/>
|
<property name="dataSource" ref="dataSource"/>
|
||||||
<property name="annotatedClasses">
|
<property name="annotatedClasses">
|
||||||
<list>
|
<list>
|
||||||
<value>com.wisemapping.model.User</value>
|
<value>com.wisemapping.model.User</value>
|
@ -0,0 +1,27 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
|
<!-- <bean id="wiseDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" destroy-method="close">-->
|
||||||
|
<!-- <property name="driverClassName" value="${database.driver}"/>-->
|
||||||
|
<!-- <property name="url" value="${database.url}"/>-->
|
||||||
|
<!-- <property name="username" value="${database.username}"/>-->
|
||||||
|
<!-- <property name="password" value="${database.password}"/>-->
|
||||||
|
<!-- <property name="testOnBorrow" value="${database.validation.enabled:true}"/>-->
|
||||||
|
<!-- <property name="defaultQueryTimeout" value="15"/>-->
|
||||||
|
<!-- <property name="maxTotal" value="100"/>-->
|
||||||
|
<!-- <property name="maxIdle" value="30"/>-->
|
||||||
|
<!-- <property name="initialSize" value="5"/>-->
|
||||||
|
<!-- <property name="maxWaitMillis" value="10000"/>-->
|
||||||
|
<!-- <property name="validationQuery" value="${database.validation.query:SELECT 1}"/>-->
|
||||||
|
<!-- </bean>-->
|
||||||
|
|
||||||
|
<!--<!– Optional configuration for external connexion pool–>-->
|
||||||
|
<!-- <bean id="wiseDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" >-->
|
||||||
|
<!-- <property name="jndiName">-->
|
||||||
|
<!-- <value>java:comp/env/jdbc/wisemapping</value>-->
|
||||||
|
<!-- </property>-->
|
||||||
|
<!-- </bean>-->
|
||||||
|
</beans>
|
46
wise-webapp/src/main/resources/spring/wisemapping-rest.xml
Normal file
46
wise-webapp/src/main/resources/spring/wisemapping-rest.xml
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!--suppress SpringModelInspection -->
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
|
http://www.springframework.org/schema/mvc
|
||||||
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||||
|
|
||||||
|
<!-- <mvc:annotation-driven>-->
|
||||||
|
<!-- <mvc:message-converters>-->
|
||||||
|
<!-- <bean class="com.wisemapping.rest.DebugMappingJacksonHttpMessageConverter"/>-->
|
||||||
|
<!-- <bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>-->
|
||||||
|
<!-- </mvc:message-converters>-->
|
||||||
|
<!-- </mvc:annotation-driven>-->
|
||||||
|
|
||||||
|
<!-- <bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">-->
|
||||||
|
<!-- <property name="favorParameter" value="true"/>-->
|
||||||
|
<!-- <property name="parameterName" value="mediaType"/>-->
|
||||||
|
<!-- <property name="defaultContentType" value="application/json" />-->
|
||||||
|
|
||||||
|
<!-- <property name="mediaTypes">-->
|
||||||
|
<!-- <map>-->
|
||||||
|
<!-- <entry key="xml" value="application/xml"/>-->
|
||||||
|
<!-- <entry key="json" value="application/json"/>-->
|
||||||
|
<!-- </map>-->
|
||||||
|
<!-- </property>-->
|
||||||
|
<!-- </bean>-->
|
||||||
|
|
||||||
|
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
||||||
|
<property name="contentNegotiationManager" ref="contentNegotiationManager"/>
|
||||||
|
<property name="viewResolvers">
|
||||||
|
<list>
|
||||||
|
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
<property name="defaultViews">
|
||||||
|
<list>
|
||||||
|
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
|
||||||
|
<property name="extractValueFromSingleKeyModel" value="true"/>
|
||||||
|
</bean>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
</beans>
|
@ -1,33 +1,28 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
http://www.springframework.org/schema/context
|
|
||||||
http://www.springframework.org/schema/context/spring-context.xsd">
|
|
||||||
|
|
||||||
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>
|
<!-- <context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>-->
|
||||||
|
|
||||||
<bean id="mailer" class="com.wisemapping.mail.Mailer">
|
<bean id="mailer" class="com.wisemapping.mail.Mailer">
|
||||||
<constructor-arg index="0" value="${mail.serverSendEmail}"/>
|
<constructor-arg index="0" value="${mail.serverSendEmail}"/>
|
||||||
<constructor-arg index="1" value="${mail.supportEmail}"/>
|
<constructor-arg index="1" value="${mail.supportEmail}"/>
|
||||||
<constructor-arg index="2" value="${mail.errorReporterEmail}"/>
|
|
||||||
|
|
||||||
<property name="mailSender" ref="mailSender"/>
|
<property name="mailSender" ref="mailSender"/>
|
||||||
<property name="velocityEngineWrapper" ref="velocityEngineWrapper"/>
|
<property name="velocityEngineWrapper" ref="velocityEngineWrapper"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="httpInvoker" class="com.wisemapping.service.google.http.HttpInvoker">
|
<bean id="httpInvoker" class="com.wisemapping.service.google.http.HttpInvoker"/>
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="googleService" class="com.wisemapping.service.google.GoogleService">
|
<bean id="googleService" class="com.wisemapping.service.google.GoogleService">
|
||||||
<property name="httpInvoker" ref="httpInvoker"/>
|
<property name="httpInvoker" ref="httpInvoker"/>
|
||||||
<property name="optinConfirmUrl" value="${security.oauth2.google.confirmUrl}"/>
|
<property name="optinConfirmUrl" value="${security.oauth2.google.confirmUrl}"/>
|
||||||
<property name="accountBasicDataUrl" value="${security.oauth2.google.userinfoUrl}"/>
|
<property name="accountBasicDataUrl" value="${security.oauth2.google.userinfoUrl}"/>
|
||||||
<property name="clientId" value="${security.oauth2.google.clientId}"/>
|
<property name="clientId" value="${security.oauth2.google.clientId:''}"/>
|
||||||
<property name="clientSecret" value="${security.oauth2.google.clientSecret}"/>
|
<property name="clientSecret" value="${security.oauth2.google.clientSecret:''}"/>
|
||||||
<property name="callbackUrl" value="${security.oauth2.google.callbackUrl}"/>
|
<property name="callbackUrl" value="${security.oauth2.google.callbackUrl:''}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="userServiceTarget" class="com.wisemapping.service.UserServiceImpl">
|
<bean id="userServiceTarget" class="com.wisemapping.service.UserServiceImpl">
|
||||||
@ -49,7 +44,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="mindMapServiceTarget" class="com.wisemapping.service.MindmapServiceImpl">
|
<bean id="mindmapService" class="com.wisemapping.service.MindmapServiceImpl">
|
||||||
<property name="mindmapManager" ref="mindmapManager"/>
|
<property name="mindmapManager" ref="mindmapManager"/>
|
||||||
<property name="userService" ref="userService"/>
|
<property name="userService" ref="userService"/>
|
||||||
<property name="notificationService" ref="notificationService"/>
|
<property name="notificationService" ref="notificationService"/>
|
||||||
@ -60,17 +55,17 @@
|
|||||||
<property name="recaptchaSecret" value="${google.recaptcha2.secretKey}"/>
|
<property name="recaptchaSecret" value="${google.recaptcha2.secretKey}"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="mindmapService" class="org.springframework.aop.framework.ProxyFactoryBean">
|
<!-- <bean id="mindmapService" class="org.springframework.aop.framework.ProxyFactoryBean">-->
|
||||||
<property name="proxyInterfaces" value="com.wisemapping.service.MindmapService"/>
|
<!-- <property name="proxyInterfaces" value="com.wisemapping.service.MindmapService"/>-->
|
||||||
<property name="interceptorNames">
|
<!-- <property name="interceptorNames">-->
|
||||||
<list>
|
<!-- <list>-->
|
||||||
<value>txInterceptor</value>
|
<!-- <value>txInterceptor</value>-->
|
||||||
<value>viewSecurityAdvisor</value>
|
<!-- <value>viewSecurityAdvisor</value>-->
|
||||||
<value>updateSecurityAdvisor</value>
|
<!-- <value>updateSecurityAdvisor</value>-->
|
||||||
</list>
|
<!-- </list>-->
|
||||||
</property>
|
<!-- </property>-->
|
||||||
<property name="target" ref="mindMapServiceTarget"/>
|
<!-- <property name="target" ref="mindMapServiceTarget"/>-->
|
||||||
</bean>
|
<!-- </bean>-->
|
||||||
|
|
||||||
|
|
||||||
<bean id="labelServiceTarget" class="com.wisemapping.service.LabelServiceImpl">
|
<bean id="labelServiceTarget" class="com.wisemapping.service.LabelServiceImpl">
|
||||||
@ -102,8 +97,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="velocityEngineWrapper" class="com.wisemapping.util.VelocityEngineWrapper">
|
<bean id="velocityEngineWrapper" class="com.wisemapping.util.VelocityEngineWrapper"/>
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="notificationService" class="com.wisemapping.mail.NotificationService">
|
<bean id="notificationService" class="com.wisemapping.mail.NotificationService">
|
||||||
<property name="baseUrl" value="${site.baseurl:http://localhost:8080/}"/>
|
<property name="baseUrl" value="${site.baseurl:http://localhost:8080/}"/>
|
||||||
@ -111,14 +105,14 @@
|
|||||||
<property name="messageSource" ref="messageSource"/>
|
<property name="messageSource" ref="messageSource"/>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
<!-- <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">-->
|
||||||
<property name="defaultEncoding" value="UTF-8"/>
|
<!-- <property name="defaultEncoding" value="UTF-8"/>-->
|
||||||
<property name="basenames">
|
<!-- <property name="basenames">-->
|
||||||
<list>
|
<!-- <list>-->
|
||||||
<value>messages</value>
|
<!-- <value>messages</value>-->
|
||||||
</list>
|
<!-- </list>-->
|
||||||
</property>
|
<!-- </property>-->
|
||||||
</bean>
|
<!-- </bean>-->
|
||||||
|
|
||||||
<import resource="wisemapping-security-${security.type}.xml"/>
|
<!-- <import resource="wisemapping-security-${security.type}.xml"/>-->
|
||||||
</beans>
|
</beans>
|
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||||
|
http://www.springframework.org/schema/mvc
|
||||||
|
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
||||||
|
|
||||||
|
<!-- Interceptors Registration -->
|
||||||
|
<mvc:interceptors>
|
||||||
|
<bean id="userLocaleInterceptor" class="com.wisemapping.filter.UserLocaleInterceptor"/>
|
||||||
|
<bean id="requestInterceptor" class="com.wisemapping.filter.RequestPropertiesInterceptor"/>
|
||||||
|
</mvc:interceptors>
|
||||||
|
|
||||||
|
<!-- <bean id="localeResolver"-->
|
||||||
|
<!-- class="org.springframework.web.servlet.i18n.SessionLocaleResolver">-->
|
||||||
|
<!-- </bean>-->
|
||||||
|
|
||||||
|
</beans>
|
26
wise-webapp/src/main/resources/spring/wisemapping.xml
Normal file
26
wise-webapp/src/main/resources/spring/wisemapping.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
||||||
|
|
||||||
|
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
||||||
|
<property name="defaultEncoding" value="UTF-8"/>
|
||||||
|
<property name="basenames">
|
||||||
|
<list>
|
||||||
|
<value>messages</value>
|
||||||
|
</list>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
|
<import resource="wisemapping-dao.xml"/>
|
||||||
|
<import resource="wisemapping-aop.xml"/>
|
||||||
|
|
||||||
|
<import resource="wisemapping-model.xml"/>
|
||||||
|
<import resource="wisemapping-service.xml"/>
|
||||||
|
|
||||||
|
<import resource="wisemapping-rest.xml"/>
|
||||||
|
<import resource="wisemapping-servlet.xml"/>
|
||||||
|
<import resource="wisemapping-datasource.xml"/>
|
||||||
|
<import resource="wisemapping-security-db.xml"/>
|
||||||
|
</beans>
|
@ -90,29 +90,29 @@
|
|||||||
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
<servlet>
|
<!-- <servlet>-->
|
||||||
<servlet-name>mvc-servlet</servlet-name>
|
<!-- <servlet-name>mvc-servlet</servlet-name>-->
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
<!-- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>-->
|
||||||
<init-param>
|
<!-- <init-param>-->
|
||||||
<param-name>contextConfigLocation</param-name>
|
<!-- <param-name>contextConfigLocation</param-name>-->
|
||||||
<param-value>
|
<!-- <param-value>-->
|
||||||
/WEB-INF/wisemapping-servlet.xml
|
<!-- /WEB-INF/wisemapping-servlet.xml-->
|
||||||
</param-value>
|
<!-- </param-value>-->
|
||||||
</init-param>
|
<!-- </init-param>-->
|
||||||
<load-on-startup>1</load-on-startup>
|
<!-- <load-on-startup>1</load-on-startup>-->
|
||||||
</servlet>
|
<!-- </servlet>-->
|
||||||
|
|
||||||
<servlet>
|
<!-- <servlet>-->
|
||||||
<servlet-name>mvc-rest</servlet-name>
|
<!-- <servlet-name>mvc-rest</servlet-name>-->
|
||||||
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
|
<!-- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>-->
|
||||||
<init-param>
|
<!-- <init-param>-->
|
||||||
<param-name>contextConfigLocation</param-name>
|
<!-- <param-name>contextConfigLocation</param-name>-->
|
||||||
<param-value>
|
<!-- <param-value>-->
|
||||||
/WEB-INF/wisemapping-rest.xml
|
<!-- /WEB-INF/wisemapping-rest.xml-->
|
||||||
</param-value>
|
<!-- </param-value>-->
|
||||||
</init-param>
|
<!-- </init-param>-->
|
||||||
<load-on-startup>1</load-on-startup>
|
<!-- <load-on-startup>1</load-on-startup>-->
|
||||||
</servlet>
|
<!-- </servlet>-->
|
||||||
|
|
||||||
<servlet-mapping>
|
<servlet-mapping>
|
||||||
<servlet-name>mvc-servlet</servlet-name>
|
<servlet-name>mvc-servlet</servlet-name>
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
|
||||||
http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
||||||
|
|
||||||
<bean id="wiseDataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
|
|
||||||
<property name="driverClassName" value="${database.driver}"/>
|
|
||||||
<property name="url" value="${database.url}"/>
|
|
||||||
<property name="username" value="${database.username}"/>
|
|
||||||
<property name="password" value="${database.password}"/>
|
|
||||||
<property name="testOnBorrow" value="${database.validation.enabled:true}"/>
|
|
||||||
<property name="defaultQueryTimeout" value="15"/>
|
|
||||||
<property name="maxTotal" value="100"/>
|
|
||||||
<property name="maxIdle" value="30"/>
|
|
||||||
<property name="initialSize" value="5"/>
|
|
||||||
<property name="maxWaitMillis" value="10000"/>
|
|
||||||
<property name="validationQuery" value="${database.validation.query:SELECT 1}"/>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<!-- Optional configuration for external connexion pool -->
|
|
||||||
<!-- <bean id="wiseDataSource" class="org.springframework.jndi.JndiObjectFactoryBean" >-->
|
|
||||||
<!-- <property name="jndiName">-->
|
|
||||||
<!-- <value>java:comp/env/jdbc/wisemapping</value>-->
|
|
||||||
<!-- </property>-->
|
|
||||||
<!-- </bean>-->
|
|
||||||
</beans>
|
|
@ -1,64 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!--suppress SpringModelInspection -->
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
|
||||||
xsi:schemaLocation="
|
|
||||||
http://www.springframework.org/schema/beans
|
|
||||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
||||||
http://www.springframework.org/schema/context
|
|
||||||
http://www.springframework.org/schema/context/spring-context.xsd
|
|
||||||
http://www.springframework.org/schema/mvc
|
|
||||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
|
||||||
|
|
||||||
<context:component-scan base-package="com.wisemapping.rest"/>
|
|
||||||
<context:annotation-config/>
|
|
||||||
|
|
||||||
<mvc:annotation-driven>
|
|
||||||
<mvc:message-converters>
|
|
||||||
<bean class="com.wisemapping.rest.DebugMappingJacksonHttpMessageConverter"/>
|
|
||||||
<bean class="org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter"/>
|
|
||||||
</mvc:message-converters>
|
|
||||||
</mvc:annotation-driven>
|
|
||||||
|
|
||||||
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
|
|
||||||
<property name="favorParameter" value="true"/>
|
|
||||||
<property name="parameterName" value="mediaType"/>
|
|
||||||
<property name="defaultContentType" value="application/json" />
|
|
||||||
|
|
||||||
<property name="mediaTypes">
|
|
||||||
<map>
|
|
||||||
<entry key="xml" value="application/xml"/>
|
|
||||||
<entry key="json" value="application/json"/>
|
|
||||||
</map>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
|
|
||||||
<property name="contentNegotiationManager" ref="contentNegotiationManager"/>
|
|
||||||
<property name="viewResolvers">
|
|
||||||
<list>
|
|
||||||
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
<property name="defaultViews">
|
|
||||||
<list>
|
|
||||||
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
|
|
||||||
<property name="extractValueFromSingleKeyModel" value="true"/>
|
|
||||||
</bean>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
|
||||||
<property name="defaultEncoding" value="UTF-8"/>
|
|
||||||
<property name="basenames">
|
|
||||||
<list>
|
|
||||||
<value>messages</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
<!-- Configuration Bean -->
|
|
||||||
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>
|
|
||||||
</beans>
|
|
@ -1,37 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xmlns:context="http://www.springframework.org/schema/context"
|
|
||||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
|
||||||
xsi:schemaLocation="
|
|
||||||
http://www.springframework.org/schema/beans
|
|
||||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
|
||||||
http://www.springframework.org/schema/context
|
|
||||||
http://www.springframework.org/schema/context/spring-context.xsd
|
|
||||||
http://www.springframework.org/schema/mvc
|
|
||||||
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
|
|
||||||
|
|
||||||
<context:component-scan base-package="com.wisemapping"/>
|
|
||||||
<context:annotation-config/>
|
|
||||||
<mvc:annotation-driven/>
|
|
||||||
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>
|
|
||||||
|
|
||||||
<!-- Interceptors Registration -->
|
|
||||||
<mvc:interceptors>
|
|
||||||
<bean id="userLocaleInterceptor" class="com.wisemapping.filter.UserLocaleInterceptor"/>
|
|
||||||
<bean id="requestInterceptor" class="com.wisemapping.filter.RequestPropertiesInterceptor"/>
|
|
||||||
</mvc:interceptors>
|
|
||||||
|
|
||||||
<bean id="localeResolver"
|
|
||||||
class="org.springframework.web.servlet.i18n.SessionLocaleResolver">
|
|
||||||
</bean>
|
|
||||||
|
|
||||||
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
|
|
||||||
<property name="defaultEncoding" value="UTF-8"/>
|
|
||||||
<property name="basenames">
|
|
||||||
<list>
|
|
||||||
<value>messages</value>
|
|
||||||
</list>
|
|
||||||
</property>
|
|
||||||
</bean>
|
|
||||||
</beans>
|
|
Loading…
x
Reference in New Issue
Block a user