apache

springboot+mybatis多数据源

会有一股神秘感。 提交于 2021-02-07 21:38:11
首先,既然是多数据源,那么我们就先看下数据源怎么配置的: javaconfig类似下面这样: MapperScan注解常用配置如下: basePackages:Base packages to scan for MyBatis interfaces,也就是mapper接口所在包名 annotationClass:This property specifies the annotation that the scanner will search for, 也就是只扫描指定包下的指定注解作为mapper,通常为org.apache.ibatis.annotations.Mapper markerInterface:This property specifies the parent that the scanner will search for,只扫描指定包下指定父接口的子接口作为mapper sqlSessionTemplateRef:指定这组mapper关联的sqlSessionTemplate sqlSessionFactoryRef:指定这组mapper关联的sqlSessionFactory 那么,问题来了,annotationClass,markerInterface都配置了或者都不配置会怎样?在org.mybatis.spring.annotation

ZooKeeper 基本操作

南笙酒味 提交于 2021-02-07 21:21:06
记录日期:2019年6月20日 14点26分 ZooKeeper 版本:3.5.5 参考链接: https://zookeeper.apache.org/doc/current/zookeeperStarted.html 1、连接 ZooKeeper E:\environment\zookeeper\apache-zookeeper-3.5.5>bin\zkCli -server 127.0.0.1:2181 2、查看节点 ls / 3、创建节点 create /zk_test my_data 4、设置节点数据 set /zk_test junk 5、获取节点数据 get /zk_test 6、删除节点 delete /zk_test 如果删除的节点存在子节点,删除失败,使用以下命令。 deleteall /zk_test 7、查看节点状态 stat /zk_test ZooKeeper 命令: ZooKeeper - server host:port cmd args addauth scheme auth close config [ -c] [-w] [- s] connect host:port create [ -s] [-e] [-c] [- t ttl] path [data] [acl] delete [- v version] path deleteall

.htaccess doesn't escape question mark on RewriteRule

佐手、 提交于 2021-02-07 20:55:14
问题 I have a website with an old type of Single Sign On. A parent website sends users to my website with a URL like: http://test.instela.fm/index.php?gid=abcd1234&u=thedewil&id=11472 and I want to rewrite it as this: http://test.instela.fm/login/abcd1234/thedewil/11472 I have created a .htaccess file as following: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^index.php?gid=(.*)&u=(.*)&id=(.*)$ login/$1/$2/$3 [L] I tried escaping the question mark in the URL

.htaccess doesn't escape question mark on RewriteRule

社会主义新天地 提交于 2021-02-07 20:54:17
问题 I have a website with an old type of Single Sign On. A parent website sends users to my website with a URL like: http://test.instela.fm/index.php?gid=abcd1234&u=thedewil&id=11472 and I want to rewrite it as this: http://test.instela.fm/login/abcd1234/thedewil/11472 I have created a .htaccess file as following: RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^index.php?gid=(.*)&u=(.*)&id=(.*)$ login/$1/$2/$3 [L] I tried escaping the question mark in the URL

java.lang.ClassNotFoundException: org.apache.commons.text.WordUtils

泪湿孤枕 提交于 2021-02-07 20:42:09
问题 I can't figure out why I'm getting a ClassNotFoundException here, since I have compiled with the appropriate jar file for WorkUtils, and the class WordUtils is clearly in the jar file. I compiled with javac -d bin -cp lib/commons-text-1.2.jar MyClass.java and run with java -cp bin MyClass Here is my java class: import org.apache.commons.text.WordUtils; class MyClass { public static void main(String[] args) { System.out.println(WordUtils.capitalize("sample text")); } } I get this error:

Nginx reverse proxy configuration

送分小仙女□ 提交于 2021-02-07 20:39:18
问题 I need nginx to reverse- proxy GET and POST requests of the form: /myapp/path/to/resource to: http://127.0.0.1:9090/path/to/resource I'm trying the following: location /myapp/(.*) { rewrite $1; proxy_pass http://127.0.0.1:9090; } but nginx is returning a HTTP 405 error [not allowed]. Any ideas on how to fix this ? Thanks. 回答1: You don't actually need to do a rewrite. You can achieve the same end with the following: location /myapp/ { proxy_pass http://127.0.0.1:9090/; } 来源: https:/

kafka集群管理工具kafka-manager部署安装

天大地大妈咪最大 提交于 2021-02-07 20:35:36
一、kafka-manager 简介 为了简化开发者和服务工程师维护Kafka集群的工作,yahoo构建了一个叫做Kafka管理器的基于Web工具,叫做 Kafka Manager。这个管理工具可以很容易地发现分布在集群中的哪些topic分布不均匀,或者是分区在整个集群分布不均匀的的情况。它支持管理多个集群、选择副本、副本重新分配以及创建Topic。同时,这个管理工具也是一个非常好的可以快速浏览这个集群的工具,有如下功能: 1.管理多个kafka集群 2.便捷的检查kafka集群状态(topics,brokers,备份分布情况,分区分布情况) 3.选择你要运行的副本 4.基于当前分区状况进行 5.可以选择topic配置并创建topic(0.8.1.1和0.8.2的配置不同) 6.删除topic(只支持0.8.2以上的版本并且要在broker配置中设置delete.topic.enable=true) 7.Topic list会指明哪些topic被删除(在0.8.2以上版本适用) 8.为已存在的topic增加分区 9.为已存在的topic更新配置 10.在多个topic上批量重分区 11.在多个topic上批量重分区(可选partition broker位置) kafka-manager 项目地址: https://github.com/yahoo/kafka-manager 二

URL Rewriting - Redirect With No File Extension

情到浓时终转凉″ 提交于 2021-02-07 19:45:57
问题 I am currently using the following rules in a .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php This works well to ensure that /myfile.php works as well as just myfile (with no extension in the URL). It also handles querystrings with no problems, so myfile?var=foo also works. The problem is that these are registering in Google Analytics as being two separate files. So while myfile.php might be the third most

URL Rewriting - Redirect With No File Extension

假如想象 提交于 2021-02-07 19:45:45
问题 I am currently using the following rules in a .htaccess file: RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php This works well to ensure that /myfile.php works as well as just myfile (with no extension in the URL). It also handles querystrings with no problems, so myfile?var=foo also works. The problem is that these are registering in Google Analytics as being two separate files. So while myfile.php might be the third most

Installing svn: error after restarting apache

﹥>﹥吖頭↗ 提交于 2021-02-07 18:29:17
问题 I've created my repository this way: sudo svnadmin create /svn After restarting apache i get this error: Syntax error on line 16 of /etc/apache2/mods-enabled/dav_svn.conf: DAV not allowed here # dav_svn.conf - Example Subversion/Apache configuration # # For details and further options see the Apache user manual and # the Subversion book. # # NOTE: for a setup with multiple vhosts, you will want to do this # configuration in /etc/apache2/sites-available/*, not here. # <Location URL> ... <